Skip to content

Instantly share code, notes, and snippets.

View torunar's full-sized avatar

Mikhail Shchekotov torunar

View GitHub Profile
diff --git a/app/addons/suppliers/func.php b/app/addons/suppliers/func.php
index 724e6ce..f738b91 100644
--- a/app/addons/suppliers/func.php
+++ b/app/addons/suppliers/func.php
@@ -517,16 +517,36 @@ function fn_suppliers_update_shipping_post(&$shipping_data, &$shipping_id, &$lan
*/
function fn_suppliers_shippings_group_products_list(&$products, &$groups)
{
- if (Registry::get('addons.suppliers.display_shipping_methods_separately') == 'N') {
- return;
diff --git a/js/tygh/checkout.js b/js/tygh/checkout.js
index 807aef7..8c36238 100644
--- a/js/tygh/checkout.js
+++ b/js/tygh/checkout.js
@@ -18,8 +18,26 @@
}
function displayRecalculate(form) {
- form.find(place_order_buttons_selector).hide();
- form.find(recalculate_buttons_selector).show();
diff --git a/app/addons/paypal/func.php b/app/addons/paypal/func.php
index 9eb8cff..fad5933 100644
--- a/app/addons/paypal/func.php
+++ b/app/addons/paypal/func.php
@@ -784,3 +784,21 @@ function fn_paypal_get_valid_currency($id)
return $currency;
}
+
+/**
diff --git a/app/addons/paypal/func.php b/app/addons/paypal/func.php
index ea78fff..d40a805 100644
--- a/app/addons/paypal/func.php
+++ b/app/addons/paypal/func.php
@@ -302,6 +302,9 @@ function fn_process_paypal_ipn($order_id, $data)
fn_change_order_status($order_id, STATUS_INCOMPLETED_ORDER);
//Sometimes, for some reasons cart_id in product products calculated incorrectly, so we need recalculate it.
$cart['change_cart_products'] = true;
+ // Store shipping rates
+ fn_store_shipping_rates($order_id, $cart, $customer_auth);
diff --git a/app/Tygh/Shippings/Services/Ups.php b/app/Tygh/Shippings/Services/Ups.php
index 8e6bb56..435b28b 100644
--- a/app/Tygh/Shippings/Services/Ups.php
+++ b/app/Tygh/Shippings/Services/Ups.php
@@ -188,13 +188,13 @@ class Ups implements IService
$origination = $this->_shipping_info['package_info']['origination'];
$location = $this->_shipping_info['package_info']['location'];
- $origination_postal = $origination['zipcode'];
- $origination_country = $origination['country'];
diff --git a/app/addons/seo/controllers/frontend/index.post.php b/app/addons/seo/controllers/frontend/index.post.php
new file mode 100644
index 0000000..8d6b3d6
--- /dev/null
+++ b/app/addons/seo/controllers/frontend/index.post.php
@@ -0,0 +1,22 @@
+<?php
+/***************************************************************************
+ * *
+ * (c) 2004 Vladimir V. Kalynyak, Alexey V. Vinokurov, Ilya M. Shalnev *
diff --git a/app/functions/fn.catalog.php b/app/functions/fn.catalog.php
index 21beeb2..982e874 100644
--- a/app/functions/fn.catalog.php
+++ b/app/functions/fn.catalog.php
@@ -1474,7 +1474,12 @@ function fn_get_categories($params = array(), $lang_code = CART_LANGUAGE)
}
if (!empty($params['max_nesting_level'])) {
- $condition .= db_quote(" AND ?:categories.level <= ?i", $params['max_nesting_level']);
+ if (!empty($params['parent_category_id'])) {
diff --git a/app/Tygh/Shippings/Services/Ups.php b/app/Tygh/Shippings/Services/Ups.php
index 435b28b..bd7415e 100644
--- a/app/Tygh/Shippings/Services/Ups.php
+++ b/app/Tygh/Shippings/Services/Ups.php
@@ -79,7 +79,7 @@ class Ups implements IService
$return[$service_code]['delivery_time'] = (string) $shipment->ScheduledDeliveryTime;
} elseif (!empty($shipment->GuaranteedDaysToDelivery)) {
- $return[$service_code]['delivery_time'] = (string) $shipment->GuaranteedDaysToDelivery;
+ $return[$service_code]['delivery_time'] = __("n_days", array($shipment->GuaranteedDaysToDelivery));
diff --git a/design/themes/responsive/templates/views/checkout/components/shipping_estimation.tpl b/design/themes/responsive/templates/views/checkout/components/shipping_estimation.tpl
index 28a2d78..1eff17b 100644
--- a/design/themes/responsive/templates/views/checkout/components/shipping_estimation.tpl
+++ b/design/themes/responsive/templates/views/checkout/components/shipping_estimation.tpl
@@ -97,9 +97,12 @@
{hook name="checkout:shipping_estimation"}
{foreach from=$product_groups key=group_key item=group name="s"}
- <p>
- <strong>{__("vendor")}:&nbsp;</strong>{$group.name|default:__("none")}
diff --git a/app/Tygh/Shippings/Shippings.php b/app/Tygh/Shippings/Shippings.php
index 015d299..461302d 100644
--- a/app/Tygh/Shippings/Shippings.php
+++ b/app/Tygh/Shippings/Shippings.php
@@ -687,7 +687,8 @@ class Shippings
'price' => $rate['price'],
'keys' => $shippings[$rate['shipping_key']]['keys'],
'error' => $rate['error'],
- 'delivery_time' => isset($rate['delivery_time']) ? $rate['delivery_time'] : false,
+ 'service_delivery_time' => isset($rate['delivery_time']) ? $rate['delivery_time'] : false,