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 e76cb749 authored by Marcos Garcia's avatar Marcos Garcia Committed by GitHub

Support combo cards for Mexico & Mexican Pesos (#666)

As requested by merchants, this commit adds support to combo cards (cards that act both as credit and debit, by choice of the shopper) to the checkout process. If shipping address is in Mexico and currency is set to Mexican Pesos, the drop down to choose between options should show up.

I created the object to check this so extensibility is possible, but another solution should be used if this gets too long.
parent 17b7e013
......@@ -505,7 +505,12 @@ define(
}
var countryId = quote.billingAddress().countryId;
var currencyCode = quote.totals().quote_currency_code;
return currencyCode === "BRL" && countryId === "BR";
var allowedCurrenciesByCountry = {
'BR': 'BRL',
'MX': 'MXN'
};
return allowedCurrenciesByCountry[countryId] &&
currencyCode === allowedCurrenciesByCountry[countryId];
},
setPlaceOrderHandler: function (handler) {
this.placeOrderHandler = handler;
......
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