Skip to content

Instantly share code, notes, and snippets.

View torunar's full-sized avatar

Mikhail Shchekotov torunar

View GitHub Profile
diff --git a/design/themes/responsive/templates/addons/lite_checkout/components/buttons/place_order.tpl b/design/themes/responsive/templates/addons/lite_checkout/components/buttons/place_order.tpl
index 3becfc74c8..d5971eb0fd 100644
--- a/design/themes/responsive/templates/addons/lite_checkout/components/buttons/place_order.tpl
+++ b/design/themes/responsive/templates/addons/lite_checkout/components/buttons/place_order.tpl
@@ -5,8 +5,12 @@
{if $but_id}id="{$but_id}"{/if}
>
{capture name="order_total"}
+ {if $cart.payment_surcharge && !$take_surcharge_from_vendor}
+ {$_total = $cart.total + $cart.payment_surcharge}
diff --git a/app/addons/lite_checkout/controllers/frontend/checkout.pre.php b/app/addons/lite_checkout/controllers/frontend/checkout.pre.php
index 708acb2799..322dcb46c6 100644
--- a/app/addons/lite_checkout/controllers/frontend/checkout.pre.php
+++ b/app/addons/lite_checkout/controllers/frontend/checkout.pre.php
@@ -40,6 +40,8 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST') {
fn_lite_checkout_backup_chosen_shipping($cart);
}
+ $cart['calculate_shipping'] = fn_lite_checkout_is_shipping_recalculation_required($_REQUEST, Tygh::$app['session'], $_SERVER);
+
diff --git a/js/tygh/core.js b/js/tygh/core.js
index 2f9f370340..a218a60554 100644
--- a/js/tygh/core.js
+++ b/js/tygh/core.js
@@ -4052,7 +4052,8 @@ var Tygh = {
if (lbl.hasClass('cm-required')) {
var el_filter = lbl.hasClass('cm-multiple-checkboxes') ? '[type=checkbox]' : '[type=radio]';
if ($(el_filter + ':not(:disabled)', elm).length && !$(el_filter + ':checked', elm).length) {
- _formMessage(_.tr('error_validator_required'), lbl);
+ var message = lbl.data('caValidatorErrorMessage') || _.tr('error_validator_required');
diff --git a/_tools/ipac_builder/ipac_builder.php b/_tools/ipac_builder/ipac_builder.php
index ea3abbe116..b341eb6a13 100644
--- a/_tools/ipac_builder/ipac_builder.php
+++ b/_tools/ipac_builder/ipac_builder.php
@@ -487,7 +487,7 @@ function fn_rb_build_core_js($params)
fn_rb_exec("(cd ${params['dir_repo']}js/core && npm run prod)");
echo(" [3/3] remove temporary files...\n");
- fn_rb_exec("(cd ${params['dir_repo']}js/core && rm -rf node_modules && rm package-lock.json)");
+ fn_rb_exec("(cd ${params['dir_repo']}js/core && rm -rf node_modules && rm -f package-lock.json)");
diff --git a/design/themes/responsive/templates/addons/rus_customer_geolocation/blocks/customer_location.tpl b/design/themes/responsive/templates/addons/rus_customer_geolocation/blocks/customer_location.tpl
index e0f1e3ce52..56739bba6a 100644
--- a/design/themes/responsive/templates/addons/rus_customer_geolocation/blocks/customer_location.tpl
+++ b/design/themes/responsive/templates/addons/rus_customer_geolocation/blocks/customer_location.tpl
@@ -23,6 +23,7 @@
link_meta="ty-rus-customer-geolocation__opener"
text=__("rus_customer_geolocation.select_your_city")
id="rus_customer_geolocation_geolocation_dialog"
+ content=""
}
diff --git a/app/functions/fn.catalog.php b/app/functions/fn.catalog.php
index c88c3b6874..d1e9bdb1c4 100644
--- a/app/functions/fn.catalog.php
+++ b/app/functions/fn.catalog.php
@@ -4503,7 +4503,7 @@ function fn_get_product_features($params = array(), $items_per_page = 0, $lang_c
"SELECT " . implode(', ', $fields)
. " FROM ?:product_features AS pf"
. " $join WHERE 1 $condition $group"
- . " ORDER BY group_position, pf.position, ?:product_features_descriptions.description $limit",
+ . " ORDER BY group_position, pf_groups.feature_id, pf.position, ?:product_features_descriptions.description $limit",
diff --git a/app/functions/fn.catalog.php b/app/functions/fn.catalog.php
index 2294d73..64522b1 100644
--- a/app/functions/fn.catalog.php
+++ b/app/functions/fn.catalog.php
@@ -7119,6 +7119,8 @@ function fn_get_products($params, $items_per_page = 0, $lang_code = CART_LANGUAG
. " FROM ?:products as products $join WHERE 1 $condition GROUP BY $group_by $having $sorting $limit";
$fn_load_products = function ($query, $params) use ($total) {
+ $dbg = db_process($query);
+ echo $dbg;
diff --git a/design/themes/responsive/templates/index.tpl b/design/themes/responsive/templates/index.tpl
index cdad18f..57d9105 100644
--- a/design/themes/responsive/templates/index.tpl
+++ b/design/themes/responsive/templates/index.tpl
@@ -59,7 +59,7 @@
<script type="text/javascript" data-no-defer>
window.jsErrors = [];
window.onerror = function(errorMessage) {
- document.write('<div data-ca-debug="1" style="border: 2px solid red; margin: 2px;">' + errorMessage + '</div>');
+ // document.write('<div data-ca-debug="1" style="border: 2px solid red; margin: 2px;">' + errorMessage + '</div>');
diff --git a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraVendors.php b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraVendors.php
index a455ac1..e1ecc9b 100644
--- a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraVendors.php
+++ b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraVendors.php
@@ -170,7 +170,10 @@ class SraVendors extends Vendors
{
$company_logos = fn_get_logos($company_id);
- $theme_logo = fn_image_to_display($company_logos['theme']['image']);
+ $theme_logo = array();
diff --git a/app/addons/advanced_import/Tygh/Addons/AdvancedImport/Exceptions/DownloadException.php b/app/addons/advanced_import/Tygh/Addons/AdvancedImport/Exceptions/DownloadException.php
new file mode 100644
index 0000000..382ff5c
--- /dev/null
+++ b/app/addons/advanced_import/Tygh/Addons/AdvancedImport/Exceptions/DownloadException.php
@@ -0,0 +1,21 @@
+<?php
+/***************************************************************************
+ * *
+ * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *