We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 351d6fbb authored by attilak's avatar attilak

Use billing address instead of shipping address

parent 9d870e65
...@@ -130,16 +130,15 @@ define( ...@@ -130,16 +130,15 @@ define(
}); });
self.messageComponents = messageComponents; self.messageComponents = messageComponents;
var shippingAddressCopuntryCode = quote.shippingAddress().countryId; var billingAddressCountryCode = quote.billingAddress().countryId;
console.log(shippingAddressCopuntryCode);
quote.shippingAddress.subscribe( function(shippingAddress) { // subscribe to the billing address changes
console.log(shippingAddressCopuntryCode); quote.billingAddress.subscribe( function(billingAddress) {
console.log(shippingAddress.countryId); if (billingAddress) {
if (billingAddressCountryCode != billingAddress.countryId) {
if (shippingAddressCopuntryCode != shippingAddress.countryId) {
adyenPaymentService.retrieveAvailablePaymentMethods(); adyenPaymentService.retrieveAvailablePaymentMethods();
shippingAddressCopuntryCode = shippingAddress.countryId; billingAddressCountryCode = billingAddress.countryId;
}
} }
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment