function addtocartaslink(&$ref) { require_once JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'addtocartaslink.php'; OPCAddToCartAsLink::addtocartaslink($ref, $this); }