С версии 4.3.2 появилась новая сущность - Tygh\Application.
Объект класса Application создаётся при инициализации ядра в файле init.php, после чего он доступен отовсюду:
// получение объекта Application
Tygh::$app| diff --git a/design/themes/basic/templates/views/profiles/components/profiles_account.tpl b/design/themes/basic/templates/views/profiles/components/profiles_account.tpl | |
| index 64a3053..732653e 100644 | |
| --- a/design/themes/basic/templates/views/profiles/components/profiles_account.tpl | |
| +++ b/design/themes/basic/templates/views/profiles/components/profiles_account.tpl | |
| @@ -4,12 +4,10 @@ | |
| {hook name="profiles:account_info"} | |
| -{if $nothing_extra || $runtime.checkout} | |
| - <div class="control-group"> |
| diff --git a/app/Tygh/Mailer.php b/app/Tygh/Mailer.php | |
| index 7d8bdd2..eeb4ace 100644 | |
| --- a/app/Tygh/Mailer.php | |
| +++ b/app/Tygh/Mailer.php | |
| @@ -261,4 +261,9 @@ class Mailer extends \PHPMailer | |
| return array_unique($result); | |
| } | |
| + | |
| + public static function ValidateAddress($email, $method = 'auto') |
| diff --git a/app/controllers/frontend/orders.php b/app/controllers/frontend/orders.php | |
| index ae83695..7d7f10a 100644 | |
| --- a/app/controllers/frontend/orders.php | |
| +++ b/app/controllers/frontend/orders.php | |
| @@ -501,6 +501,41 @@ function fn_reorder($order_id, &$cart, &$auth) | |
| if ($amount = fn_check_amount_in_stock($v['product_id'], $v['amount'], $v['product_options'], $k, $_is_edp, 0, $cart)) { | |
| $cart['products'][$k]['amount'] = $amount; | |
| + // Check if the product price with options modifiers equals to zero | |
| + $price = fn_get_product_price($v['product_id'], $amount, $auth); |
| diff --git a/app/functions/fn.fs.php b/app/functions/fn.fs.php | |
| index 87d88b7..f28a5fe 100644 | |
| --- a/app/functions/fn.fs.php | |
| +++ b/app/functions/fn.fs.php | |
| @@ -308,7 +308,7 @@ function fn_get_file_type($filename, $not_available_result = 'application/octet- | |
| $types = fn_get_ext_mime_types('ext'); | |
| - $ext = fn_get_file_ext($filename); | |
| + $ext = fn_strtolower(fn_get_file_ext($filename)); |
| diff --git a/app/Tygh/Backend/Storage/File.php b/app/Tygh/Backend/Storage/File.php | |
| index 70d4a0d..be3910f 100644 | |
| --- a/app/Tygh/Backend/Storage/File.php | |
| +++ b/app/Tygh/Backend/Storage/File.php | |
| @@ -124,7 +124,9 @@ class File extends ABackend | |
| return $file; | |
| } | |
| - if ($this->getOption('cdn') && Cdn::instance()->getOption('is_enabled')) { | |
| + $is_cdn = ($this->getOption('cdn') && Cdn::instance()->getOption('is_enabled')); |
| diff --git a/app/controllers/backend/exim.php b/app/controllers/backend/exim.php | |
| index 22409f8..92bbbae 100644 | |
| --- a/app/controllers/backend/exim.php | |
| +++ b/app/controllers/backend/exim.php | |
| @@ -1793,6 +1793,9 @@ function fn_export_build_conditions($pattern, $options) | |
| return $conditions; | |
| } | |
| +/** | |
| + * @deprecated, use fn_exim_quote instead |
| diff --git a/app/controllers/backend/exim.php b/app/controllers/backend/exim.php | |
| index 22409f8..92bbbae 100644 | |
| --- a/app/controllers/backend/exim.php | |
| +++ b/app/controllers/backend/exim.php | |
| @@ -1793,6 +1793,9 @@ function fn_export_build_conditions($pattern, $options) | |
| return $conditions; | |
| } | |
| +/** | |
| + * @deprecated, use fn_exim_quote instead |
| diff --git a/app/addons/reward_points/func.php b/app/addons/reward_points/func.php | |
| index f23a317..98a5e8d 100644 | |
| --- a/app/addons/reward_points/func.php | |
| +++ b/app/addons/reward_points/func.php | |
| @@ -164,8 +164,10 @@ function fn_reward_points_calculate_cart_taxes_pre(&$cart, &$cart_products, &$sh | |
| if (isset($cart_products[$k]['points_info']['raw_price'])) { | |
| $product_price_in_points = $price_coef * $cart_products[$k]['points_info']['raw_price']; | |
| $cart['products'][$k]['extra']['points_info']['raw_price'] = $product_price_in_points; | |
| - $cart['products'][$k]['extra']['points_info']['display_price'] = $cart['products'][$k]['extra']['points_info']['price'] = round($product_price_in_points); | |
| - $cart['points_info']['total_price'] = (isset($cart['points_info']['total_price']) ? $cart['points_info']['total_price'] : 0) + $product_price_in_points; |
| server { | |
| listen 80; | |
| server_name cscart.dev; | |
| server_name test.cscart.dev; | |
| ############################################################################ | |
| # listen 443 ssl; | |
| # ssl_certificate /etc/nginx/ssl/nginx.crt; | |
| # ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
| ############################################################################ | |
| charset utf-8; |