Skip to content

Instantly share code, notes, and snippets.

View torunar's full-sized avatar

Mikhail Shchekotov torunar

View GitHub Profile
diff --git a/js/addons/rus_cities/func.js b/js/addons/rus_cities/func.js
index dfbb2898b0..e7c8f464c4 100644
--- a/js/addons/rus_cities/func.js
+++ b/js/addons/rus_cities/func.js
@@ -20,7 +20,10 @@
getRusCities(type, request, response);
},
open: function () {
- $(this).autocomplete('widget').zIndex($.ceDialog('get_last').closest('.ui-dialog').css('z-index')+1);
+ $(this).autocomplete('widget').css(
{capture name="mainbox"}
<form action="{""|fn_url}" method="post" id="states_form" name="states_form">
{include file="common/pagination.tpl" save_current_page=true save_current_url=true}
{if $states}
{capture name="states_table"}
<div class="table-responsive-wrapper longtap-selection">
<table width="100%" class="table table-middle table--relative table-responsive state-table">
<thead
diff --git a/app/functions/fn.cart.php b/app/functions/fn.cart.php
index b055080a93..5d3761e8e7 100644
--- a/app/functions/fn.cart.php
+++ b/app/functions/fn.cart.php
@@ -2661,7 +2661,7 @@ function fn_change_order_status($order_id, $status_to, $status_from = '', $force
new OrderProvider($order_info)
);
if ($edp_data) {
- $notification_rules = fn_get_edp_notification_rules($force_notification, $edp_data);
+ $notification_rules = fn_get_edp_notification_rules($force_notification ?: [], $edp_data);
@torunar
torunar / main.sh
Created August 31, 2020 09:43
convert PHP files to PDF
#/usr/bin/env sh
cd /Applications/LibreOffice.app/Contents/MacOS;
./soffice --headless \
--convert-to pdf \
--infilter=Text \
--outdir ~/output \
~/input/**/*.php
diff --git a/design/themes/responsive/templates/addons/image_zoom/hooks/index/scripts.post.tpl b/design/themes/responsive/templates/addons/image_zoom/hooks/index/scripts.post.tpl
index fc27386469..9807196a49 100644
--- a/design/themes/responsive/templates/addons/image_zoom/hooks/index/scripts.post.tpl
+++ b/design/themes/responsive/templates/addons/image_zoom/hooks/index/scripts.post.tpl
@@ -3,7 +3,7 @@
<script type="application/javascript">
(function (_, $) {
- $.ceEvent('on', 'ce.commoninit', function (context) {
+ $.ceEvent('on', 'ce.responsive_classes.ready', function () {
diff --git a/app/addons/yandex_checkout/controllers/common/yandex_checkout.php b/app/addons/yandex_checkout/controllers/common/yandex_checkout.php
index 7eb2edd951..0c2fe8b8a3 100644
--- a/app/addons/yandex_checkout/controllers/common/yandex_checkout.php
+++ b/app/addons/yandex_checkout/controllers/common/yandex_checkout.php
@@ -30,10 +30,15 @@ if ($mode == 'check_payment') {
}
$order_info = fn_get_order_info($metadata['order_id']);
$payment_data = $order_info['payment_info'];
- if ($payment_data['id'] !== $service->getPaymentIdFromNotification($response)) {
+ if ($payment_data['payment_id'] !== $service->getPaymentIdFromNotification($response)) {
diff --git a/app/controllers/backend/profiles.php b/app/controllers/backend/profiles.php
index abc5a286ae..c3c0c3c09b 100644
--- a/app/controllers/backend/profiles.php
+++ b/app/controllers/backend/profiles.php
@@ -13,9 +13,9 @@
****************************************************************************/
use Tygh\Api;
-use Tygh\Registry;
use Tygh\Enum\UserTypes;
diff --git a/app/addons/vendor_rating/src/ServiceProvider.php b/app/addons/vendor_rating/src/ServiceProvider.php
index 44df374fe4..54e64b7523 100644
--- a/app/addons/vendor_rating/src/ServiceProvider.php
+++ b/app/addons/vendor_rating/src/ServiceProvider.php
@@ -130,7 +130,7 @@ class ServiceProvider implements ServiceProviderInterface
/** @var \Tygh\ServerEnvironment $env */
$env = $app['server.env'];
- if (version_compare($env->getPhpVersion(), '7.0.0', '>=')) {
+ if (version_compare($env->getPhpVersion(), '7.1.0', '>=')) {
diff --git a/app/addons/store_locator/func.php b/app/addons/store_locator/func.php
index 65176887a6..95092eb9c3 100644
--- a/app/addons/store_locator/func.php
+++ b/app/addons/store_locator/func.php
@@ -632,3 +632,17 @@ function fn_store_locator_calculate_cart_post($cart, $auth, $calculate_shipping,
}
}
}
+
+/**
diff --git a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraProducts.php b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraProducts.php
index 7d2d08091c..f7251279e0 100644
--- a/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraProducts.php
+++ b/app/addons/storefront_rest_api/Tygh/Api/Entities/v40/SraProducts.php
@@ -86,7 +86,7 @@ class SraProducts extends Products
$result['data'] = reset($products);
} else {
$result['data']['products'] = $products;
- $result['data']['filters'] = fn_get_filters_products_count($result['data']['params'], $lang_code);
+ list($result['data']['filters']) = fn_get_filters_products_count($result['data']['params'], $lang_code);