8000 MWPW-169236 [Merch Cards] Support for Volume Discount Flex Promos by bozojovicic · Pull Request #4501 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MWPW-169236 [Merch Cards] Support for Volume Discount Flex Promos #4501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from

Conversation

bozojovicic
Copy link
Contributor
@bozojovicic bozojovicic commented Jul 4, 2025

For merch cards with prices with promos where the offer has minProductQuantity > 1 I added the support for these promotions based on selected value in the quantity selector. If such price with promo is not in the card or quantity selector is not there, nothing will change. If they are both there and the selected quantity is >= minProductQuantity then :

  • price is displayed with promotion (with old price)
  • CTA URL contains apc parameter with the promo code if that CTA is authored with that promo code

If the selected quantity is < minProductQuantity then :

  • price is displayed without promotion (no old price)
  • CTA URL loses apc parameter and data-promotion-code attribute (if that CTA is authored with that promo code)

I added unit tests where all this is simulated.

Resolves: MWPW-169236

Test URLs:

Copy link
Contributor
aem-code-sync bot commented Jul 4, 2025
Page Scores Audits Google
📱 /drafts/bozo/qs-promo?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /drafts/bozo/qs-promo?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@bozojovicic bozojovicic marked this pull request as ready for review July 4, 2025 11:34
@bozojovicic bozojovicic requested a review from a team as a code owner July 4, 2025 11:34
Copy link
Contributor
@yesil yesil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, the only minQuantity logic we need to have is promo price rendering in inline-price.
checkout links should be good as is.
Happy to discuss these in a call.


const price = this.prices[0];
if (this.quantityBasedPromo?.resolved && this.quantityBasedPromo?.promotionCode && price) {
if (event.detail.option >= this.quantityBasedPromo.minProductQuantity) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the whole promo min quantity logic should move in checkout-mixin.
I don't understand the intent here. Promo code should remain on checkout links irrespective of the quantity. It belongs checkout page to apply or not the promo based on the quantity.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok @yesil I will add the question to the ticket if CTAs should be affected by this change or commerce will handle it. Maybe it's not needed for CTAs. The more I ready the ticket description the less I'm sure. If it's needed, I will see how to move the logic to checkout-mixin.js

@milo-pr-merge milo-pr-merge bot deleted the branch adobecom:plans July 8, 2025 08:59
@milo-pr-merge milo-pr-merge bot closed this Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0