Skip to content

Commit

Permalink
MWPW-161289 Catalog CTA IMS country used in commerce calls (#3136)
Browse files Browse the repository at this point in the history
* MWPW-161289 Catalog CTA IMS country used in commerce calls

* Trigger Build

* MWPW-161289 Catalog CTA IMS country used in commerce calls

* MWPW-161289 Catalog CTA IMS country used in commerce calls - commerce re-generated

* Trigger Build

* Trigger Build

* MWPW-161289 Catalog CTA IMS country used in commerce calls

* MWPW-161289 Catalog CTA IMS country used in commerce calls

* Trigger Build

* Expired test promo fixed

* Expired test promo fixed

* Trigger Build

* Trigger Build

* New commerce build

* Expired test promo rollback

* New commerce build

* Trigger Build

* Trigger Build

* New mas build

* New mas and commerce build

---------

Co-authored-by: Bozo Jovicic <bozo@hitthecode.com>
  • Loading branch information
bozojovicic and Bozo Jovicic authored Nov 13, 2024
1 parent 343ba6e commit 031b5d2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion libs/deps/mas/commerce.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions libs/deps/mas/mas.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions libs/features/mas/commerce/src/checkout-link.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ export class CheckoutLink extends HTMLAnchorElement {
if (countryCode) this.dataset.imsCountry = countryCode;
}, ignore);
}
overrides.imsCountry = null;
const options = service.collectCheckoutOptions(overrides, this);
if (!options.wcsOsi.length) return false;
let extraOptions;
Expand All @@ -155,6 +156,7 @@ export class CheckoutLink extends HTMLAnchorElement {
let offers = await Promise.all(promises);
// offer is expected to contain one or two offers at max (en, mult)
offers = offers.map((offer) => selectOffers(offer, options));
options.country = this.dataset.imsCountry || options.country;
const checkoutAction = await service.buildCheckoutAction?.(
offers.flat(),
{ ...extraOptions, ...options },
Expand Down
10 changes: 5 additions & 5 deletions libs/features/mas/mas/dist/mas.js

Large diffs are not rendered by default.

0 comments on commit 031b5d2

Please sign in to comment.