Closed template-provider closed 2 years ago
Do you use some one-step-checkout solution? In regular checkout, all selections made in the service box are persisted when proceeding to the payment step.
@mam08ixo Yes, it is a one page checkout. You can check it yourself. https://shop.icletta.com/ Do you have any ideas to persist it after the loading? I am not a javascript guru ;-)
If the service selection does not get cached and persisted in your custom checkout implementation, then you could try patching/replacing the service input component to add an initialize
function that sets the current (default) selection already on load:
initialize: function () {
this._super();
if (this.value() !== '') {
selections.addSelection(
this.shippingOption.code,
this.shippingOptionInput.code,
this.value()
);
}
}
@mam08ixo did work like a charm ... thx for the help
Hi, as in #8 mentioned I try to add the default value of the parcel notification to enable. For this I created a class with a function like this:
So far this works in the frontend. The checkbox is checked and the customer orders. But the parcel notification is not realy active, with creating the shipping label the notification is disabled. However, if I disable in the frontend the checkbox and enable it again, it works.
I digged a little into the code and found, that with the checking of the checkox the local storage gets refreshed with that entry:
So with an initial default value that "cachedShippingOptionSelections" is not created. Does anybody have an idea how to solve this? thx