Skip to content

Instantly share code, notes, and snippets.

View ichaykin's full-sized avatar
🙃

ichaykin ichaykin

🙃
View GitHub Profile
diff --git a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraStorefront.php b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraStorefront.php
index 12a97a44be..7efc633286 100644
--- a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraStorefront.php
+++ b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraStorefront.php
@@ -41,15 +41,7 @@ class SraStorefront extends ASraEntity
}
$data = fn_storefront_rest_api_get_storefront($id);
-
- if ($data) {
diff --git a/app/addons/product_variations/controllers/backend/product_variations.php b/app/addons/product_variations/controllers/backend/product_variations.php
index e8edf4830d..20f165a6c4 100644
--- a/app/addons/product_variations/controllers/backend/product_variations.php
+++ b/app/addons/product_variations/controllers/backend/product_variations.php
@@ -197,7 +197,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$request = new GenerateProductsAndAttachToGroupRequest(
$group_id,
$product_id,
- $generation_form->getCombinationsData()
+ $generation_form->getCombinationsData(),
diff --git a/app/addons/blog/func.php b/app/addons/blog/func.php
index 2e75e3248b..f0f7df1ca8 100644
--- a/app/addons/blog/func.php
+++ b/app/addons/blog/func.php
@@ -115,10 +115,13 @@ function fn_blog_update_page_post($page_data, $page_id, $lang_code, $create, $ol
if (!empty($page_data['page_type']) && $page_data['page_type'] == PAGE_TYPE_BLOG) {
fn_attach_image_pairs('blog_image', 'blog', $page_id, $lang_code);
- db_query("REPLACE INTO ?:blog_authors ?e", array(
- 'page_id' => $page_id,
diff --git a/design/themes/responsive/templates/addons/hybrid_auth/hooks/index/login_buttons.pre.tpl b/design/themes/responsive/templates/addons/hybrid_auth/hooks/index/login_buttons.pre.tpl
index f8e8e87b63..19d7dc005d 100644
--- a/design/themes/responsive/templates/addons/hybrid_auth/hooks/index/login_buttons.pre.tpl
+++ b/design/themes/responsive/templates/addons/hybrid_auth/hooks/index/login_buttons.pre.tpl
@@ -1,20 +1,3 @@
{if is_array($providers_list)}
- {hook name="hybrid_auth:login_buttons"}
- {if !isset($redirect_url)}
- {$redirect_url = $config.current_url}
- {/if}
diff --git a/js/tygh/backend/promotion_update.js b/js/tygh/backend/promotion_update.js
index de999b7507..93e9159e94 100644
--- a/js/tygh/backend/promotion_update.js
+++ b/js/tygh/backend/promotion_update.js
@@ -111,8 +111,9 @@
}
this.$childSelect.attr('multiple', childSelect2Settings.multiple);
- this.$childInput.addClass('hidden');
this.$childSelect.prop('disabled', false);
diff --git a/app/addons/stripe/controllers/frontend/checkout.pre.php b/app/addons/stripe/controllers/frontend/checkout.pre.php
index cc734d82c8..db01bc1b52 100644
--- a/app/addons/stripe/controllers/frontend/checkout.pre.php
+++ b/app/addons/stripe/controllers/frontend/checkout.pre.php
@@ -45,4 +45,5 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST'
}
fn_calculate_cart_content($cart, $auth);
+ fn_save_cart_content($cart, $auth['user_id']);
}
diff --git a/app/Tygh/Shippings/Shippings.php b/app/Tygh/Shippings/Shippings.php
index 6679c67574..8dc3f50854 100644
--- a/app/Tygh/Shippings/Shippings.php
+++ b/app/Tygh/Shippings/Shippings.php
@@ -64,7 +64,7 @@ class Shippings
fn_set_hook('shippings_group_products_list', $products, $groups);
foreach ($groups as $key_group => $group) {
- $groups[$key_group]['group_key'] = $group['company_id'];
+ $groups[$key_group]['group_key'] = !empty($group['group_key']) ? $group['group_key'] : $group['company_id'];
diff --git a/app/addons/product_variations/src/HookHandlers/ProductsHookHandler.php b/app/addons/product_variations/src/HookHandlers/ProductsHookHandler.php
index 62ab242653..b96a79978a 100644
--- a/app/addons/product_variations/src/HookHandlers/ProductsHookHandler.php
+++ b/app/addons/product_variations/src/HookHandlers/ProductsHookHandler.php
@@ -1382,13 +1382,21 @@ class ProductsHookHandler
$query = ServiceProvider::getQueryFactory()->createQuery(
ProductRepository::TABLE_PRODUCT_FEATURE_VALUES,
['variant_id' => $variant_ids, 'lang_code' => CART_LANGUAGE],
- ['fv.feature_id'],
- 'fv'
diff --git a/design/backend/templates/views/shippings/update.tpl b/design/backend/templates/views/shippings/update.tpl
index 5c74b6ea16..cef1756bd2 100644
--- a/design/backend/templates/views/shippings/update.tpl
+++ b/design/backend/templates/views/shippings/update.tpl
@@ -244,7 +244,7 @@
</div>
</div>
-{if "MULTIVENDOR"|fn_allowed_for && $allow_save}
+{if "MULTIVENDOR"|fn_allowed_for && $allow_save && $auth.user_type === "UserTypes::ADMIN"|enum}
diff --git a/app/controllers/frontend/checkout.php b/app/controllers/frontend/checkout.php
index 4df88db9f8..df2ec00828 100644
--- a/app/controllers/frontend/checkout.php
+++ b/app/controllers/frontend/checkout.php
@@ -43,6 +43,10 @@ $cart = &Tygh::$app['session']['cart'];
$view = Tygh::$app['view'];
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+ if ($mode === 'add') {
+ $cart['hd_skip_calculate_shipping'] = true;