static function get_sell_url($course_id) { $params = JComponentHelper::getParams('com_joomdle'); $shop = $params->get('shop_integration'); switch ($shop) { case 'tienda': $url = JoomdleHelperShop::get_tienda_sell_url($course_id); break; case 'virtuemart2': $url = JoomdleHelperShop::get_vm2_sell_url($course_id); break; case 'hikashop': $url = JoomdleHelperShop::get_hikashop_sell_url($course_id); break; default: JPluginHelper::importPlugin('joomdleshop'); $dispatcher = JDispatcher::getInstance(); $result = $dispatcher->trigger('onGetSellUrl', array($course_id)); $url = array_shift($result); break; } $shop_itemid = $params->get('shop_itemid'); if ($shop_itemid) { $url .= "&Itemid={$shop_itemid}"; } return $url; }