Merge branch 'ticket-10657-PhileaMulti' into develop
This commit is contained in:
commit
894de500bc
@ -99,12 +99,17 @@ class CartController extends CartControllerCore
|
||||
((int)$current_sale['delivery_delay'] != 1 && (int)$current_sale['delivery_delay'] != 5)
|
||||
&& (int)$adding_sale['id_sale'] != (int)$current_sale['id_sale']
|
||||
&& (
|
||||
((int)$current_sale['shipping'] != 1 || (int)$adding_sale['shipping'] != 1)
|
||||
&& (int)$adding_sale['delivery_delay'] != (int)$current_sale['delivery_delay']
|
||||
(
|
||||
((int)$current_sale['shipping'] == 1 && (int)$current_sale['shipping'] == (int)$adding_sale['shipping'])
|
||||
&& (int)$adding_sale['delivery_delay'] != (int)$current_sale['delivery_delay']
|
||||
)
|
||||
|| ((int)$current_sale['shipping'] != 1 && (int)$adding_sale['shipping'] == 1)
|
||||
)
|
||||
) || (
|
||||
((int)$current_sale['delivery_delay'] != 1 && (int)$current_sale['delivery_delay'] != 5)
|
||||
&& ((int)$adding_sale['delivery_delay'] == 1 || (int)$adding_sale['delivery_delay'] == 5)
|
||||
(int)$current_sale['delivery_delay'] != 1 && (int)$adding_sale['delivery_delay'] == 1
|
||||
) || (
|
||||
((int)$current_sale['delivery_delay'] != 5 && (int)$adding_sale['delivery_delay'] == 5)
|
||||
|| ((int)$current_sale['delivery_delay'] == 5 && (int)$adding_sale['delivery_delay'] != 5)
|
||||
)) {
|
||||
// Product in cart comes from special delivery sale - only products from the same sale can be added
|
||||
if (Tools::getValue('ajax') == 'true') {
|
||||
@ -112,10 +117,7 @@ class CartController extends CartControllerCore
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Sorry your cart already contains products from a sale shipped within a special period. To continue, please confirm your order or empty your cart.', false);
|
||||
}
|
||||
} elseif (
|
||||
((int)$current_sale['delivery_delay'] == 1 || (int)$current_sale['delivery_delay'] == 5)
|
||||
&& ((int)$adding_sale['delivery_delay'] != 1 && (int)$adding_sale['delivery_delay'] != 5)
|
||||
) {
|
||||
} elseif ((int)$current_sale['delivery_delay'] == 1 && (int)$adding_sale['delivery_delay'] != 1) {
|
||||
// Product in cart comes from classic delivery sale - only products from classic delivery sale can be added
|
||||
if (Tools::getValue('ajax') == 'true') {
|
||||
die('{"hasError" : true,"popup_error_cart": true, "errors" : ["'.Tools::displayError('Sorry your cart already contains products from a sale shipped within 3 weeks. To continue, please confirm your order or empty your cart.', false).'"]}');
|
||||
|
Loading…
Reference in New Issue
Block a user