Skip to content

Commit 6d35420

Browse files
committed
Merge branch '8.1.x' into fix/32218-responsive-visual-issues-new-product-page
2 parents f3a2dae + e234d66 commit 6d35420

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

admin-dev/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
$kernel = new AppKernel(_PS_ENV_, _PS_MODE_DEV_);
7575
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
76-
//Request::enableHttpMethodParameterOverride();
76+
Request::enableHttpMethodParameterOverride();
7777
$request = Request::createFromGlobals();
7878
Request::setTrustedProxies([], Request::HEADER_X_FORWARDED_ALL);
7979

admin-dev/themes/new-theme/js/pages/product/service/image.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,11 @@ export const saveImageInformations = async (
7373
data[`${formName}[apply_to_all_stores]`] = selectedFile.applyToAllStores;
7474

7575
return $.ajax(saveUrl, {
76-
method: 'PATCH',
77-
data,
76+
method: 'POST',
77+
data: {
78+
...data,
79+
_method: 'PATCH',
80+
},
7881
});
7982
};
8083

@@ -113,8 +116,11 @@ export const saveImagePosition = async (
113116
data[`${formName}[shop_id]`] = shopId || 0;
114117

115118
return $.ajax(sortUrl, {
116-
method: 'PATCH',
117-
data,
119+
method: 'POST',
120+
data: {
121+
...data,
122+
_method: 'PATCH',
123+
},
118124
});
119125
};
120126

config/smarty.config.inc.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function smartyEscape($string, $esc_type = 'html', $char_set = null, $double_enc
9898
// Native PHP functions
9999
smartyRegisterFunction($smarty, 'modifier', 'addcslashes', 'addcslashes');
100100
smartyRegisterFunction($smarty, 'modifier', 'addslashes', 'addslashes');
101+
smartyRegisterFunction($smarty, 'modifier', 'array_slice', 'array_slice');
101102
smartyRegisterFunction($smarty, 'modifier', 'date', 'date');
102103
smartyRegisterFunction($smarty, 'modifier', 'explode', 'explode');
103104
smartyRegisterFunction($smarty, 'modifier', 'floatval', 'floatval');

src/Adapter/Order/CommandHandler/UpdateOrderStatusHandler.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ public function handle(UpdateOrderStatusCommand $command)
5151
$order = $this->getOrder($command->getOrderId());
5252
$orderState = $this->getOrderStateObject($command->getNewOrderStatusId());
5353

54+
/*
55+
* Try to load current order status. There may be cases when there is none, for example when something happens
56+
* during order creation process. That's why we check for $currentOrderState validity.
57+
*/
5458
$currentOrderState = $order->getCurrentOrderState();
55-
56-
if ($currentOrderState->id == $orderState->id) {
59+
if (!empty($currentOrderState) && $currentOrderState->id == $orderState->id) {
5760
throw new OrderException('The order has already been assigned this status.');
5861
}
5962

@@ -69,10 +72,10 @@ public function handle(UpdateOrderStatusCommand $command)
6972

7073
$history->changeIdOrderState((int) $orderState->id, $order, $useExistingPayments);
7174

72-
$carrier = new Carrier($order->id_carrier, (int) $order->getAssociatedLanguage()->getId());
7375
$templateVars = [];
7476

7577
if ($history->id_order_state == Configuration::get('PS_OS_SHIPPING') && $order->getShippingNumber()) {
78+
$carrier = new Carrier($order->id_carrier, (int) $order->getAssociatedLanguage()->getId());
7679
$templateVars = [
7780
'{followup}' => str_replace('@', $order->getShippingNumber(), $carrier->url),
7881
];

src/Core/Module/ModuleRepository.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,11 @@ public function clearCache(?string $moduleName = null, bool $allShops = false):
211211
}
212212
}
213213
}
214+
}
214215

215-
return true;
216-
} else {
217-
$cacheKey = $this->getCacheKey($moduleName);
218-
if ($this->cacheProvider->contains($cacheKey)) {
219-
return $this->cacheProvider->delete($cacheKey);
220-
}
216+
$cacheKey = $this->getCacheKey($moduleName);
217+
if ($this->cacheProvider->contains($cacheKey)) {
218+
return $this->cacheProvider->delete($cacheKey);
221219
}
222220
}
223221

themes/_core/js/checkout-steps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default class Steps {
3333
this.$steps = $(prestashop.selectors.checkout.step);
3434
this.$steps.off('click');
3535

36-
this.$clickableSteps = $(currentStepSelector).prevAll().andSelf();
36+
this.$clickableSteps = $(currentStepSelector).prevAll().addBack();
3737
this.$clickableSteps.addClass('-clickable');
3838
}
3939

0 commit comments

Comments
 (0)