|
|
|
|
@ -108,6 +108,7 @@ class BuyCoursesPlugin extends Plugin |
|
|
|
|
'commissions_enable' => 'boolean', |
|
|
|
|
'unregistered_users_enable' => 'boolean', |
|
|
|
|
'hide_free_text' => 'boolean', |
|
|
|
|
'hide_shopping_cart_from_course_catalogue' => 'boolean', |
|
|
|
|
'invoicing_enable' => 'boolean', |
|
|
|
|
'tax_enable' => 'boolean', |
|
|
|
|
'use_currency_symbol' => 'boolean', |
|
|
|
|
@ -606,8 +607,12 @@ class BuyCoursesPlugin extends Plugin |
|
|
|
|
$productId = $productId; |
|
|
|
|
$productType = $productType; |
|
|
|
|
$url = api_get_path(WEB_PLUGIN_PATH).'buycourses/src/process.php?i='.$productId.'&t='.$productType; |
|
|
|
|
$buyButton = Display::returnFontAwesomeIcon('shopping-cart'); |
|
|
|
|
if ($this->get('hide_shopping_cart_from_course_catalogue') === 'true') { |
|
|
|
|
$buyButton = Display::returnFontAwesomeIcon('check').PHP_EOL.get_lang('Subscribe'); |
|
|
|
|
} |
|
|
|
|
$html = '<a class="btn btn-success btn-sm" title="'.$this->get_lang('Buy').'" href="'.$url.'">'. |
|
|
|
|
Display::returnFontAwesomeIcon('shopping-cart').'</a>'; |
|
|
|
|
$buyButton .'</a>'; |
|
|
|
|
|
|
|
|
|
return $html; |
|
|
|
|
} |
|
|
|
|
|