Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

Commit f04a76e

Browse files
committed
Release version 2.0.19
ISSUE:CS-4550
1 parent 951b9bf commit f04a76e

File tree

3 files changed

+9
-13
lines changed

3 files changed

+9
-13
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "magento2-module",
55
"homepage": "https://www.sendcloud.com/",
66
"license": "Apache-2.0",
7-
"version": "2.0.18",
7+
"version": "2.0.19",
88
"require": {
99
"php": "~7.0|~7.1|~7.2|~7.3|~7.4|~8.1"
1010
},

etc/module.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
3-
<module name="SendCloud_SendCloud" setup_version="2.0.18">
3+
<module name="SendCloud_SendCloud" setup_version="2.0.19">
44
<sequence>
55
<module name="Magento_Shipping"/>
66
<module name="Magento_Multishipping"/>

view/frontend/web/js/checkout/checkout.js

+7-11
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ define([
1919
let mountElement = null;
2020

2121
let widgetStates = {};
22-
function getWidgetState() {
23-
let state = quote.getState();
24-
25-
if (widgetStates[quote.getSendcloudDeliveryMethodId()]) {
26-
state = widgetStates[quote.getSendcloudDeliveryMethodId()]
27-
}
28-
29-
return state;
30-
}
3122

3223
function setWidgetState(state) {
3324
widgetStates[selectedDeliveryMethodId] = state;
@@ -78,7 +69,13 @@ define([
7869
}
7970

8071
function isDeliveryMethodChanged() {
81-
return quote.getSendcloudDeliveryMethodId() !== selectedDeliveryMethodId;
72+
let isDeliveryMethodChanged = quote.getSendcloudDeliveryMethodId() !== selectedDeliveryMethodId;
73+
if (isDeliveryMethodChanged) {
74+
quote.setDeliveryMethodData({delivery_method_data: null});
75+
setShippingInformationAction();
76+
}
77+
78+
return isDeliveryMethodChanged;
8279
}
8380

8481
function doRenderWidget() {
@@ -112,7 +109,6 @@ define([
112109
shippingData: getServicePointData(),
113110
renderDate: new Date(),
114111
locale: window.storeLocale.replace('_', '-'),
115-
state: getWidgetState(),
116112
localeMessages: window.translations
117113
}).then(function (destructorCallback) {
118114
renderedWidgetDestructor = destructorCallback;

0 commit comments

Comments
 (0)