Hi.
I would like to change post code on cart (in Summary section) as soon as a client input their postcode in a popup field.
$("#popuppostcode").on('change', function () {
// Update Zip/Postal Code in Summery section on Cart
});I have added a code in customer-data.js
Would you give me the suggestions for it?
Solved! Go to Solution.
$("#popuppostcode").on('change', function (event) {
var postcode = $(this).val();
$('input[name="postcode"]').val(postcode);
});Sorry I did it myself.
Hello @tvgarden
$('input[name="postcode"]').val(postcode);
// after that, you need to fire the relative event to reload sidebar.
$('input[name="postcode"]').trigger('change');Hope it will help you.