MWPW-188624: support promo override in grouped variations#736
Conversation
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch.
Commits
|
|
There are test issues, please check! |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #736 +/- ##
==========================================
- Coverage 87.46% 87.44% -0.03%
==========================================
Files 210 211 +1
Lines 63107 63410 +303
==========================================
+ Hits 55198 55447 +249
- Misses 7909 7963 +54
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
There are conflicts with files in |
| } | ||
|
|
||
| #handleCommerceReady = (event) => { | ||
| this.#registerCommercePriceProviders(event.detail || event.target); |
There was a problem hiding this comment.
event.target for a wcms:commerce:ready event dispatched on document is document, not the commerce service element. So this fallback would pass document to the registration function, which would silently fail the service?.providers?.price guard. The fallback is effectively dead code.
The function already has document.querySelector('mas-commerce-service') as its default arg, so the event.target path adds noise without benefit.
| super.updated(changedProperties); | ||
| if (changedProperties.has('previewLocaleOverride')) { | ||
| const oldValue = changedProperties.get('previewLocaleOverride'); | ||
| if (oldValue !== this.previewLocaleOverride) { |
There was a problem hiding this comment.
LitElement only populates changedProperties with properties that actually changed, so this check is always true. It's harmless but misleading.
|
@yesil when i open the card that is used in Nala tests, in the editor and the card preview the promo is applied to the price in the description (on prod there is no promo applied to this price). At the same time, the Save button is disabled so user cannot save this new option if they want to. On the card preview in the render view there is not strikethrough price. This is confusing for the user. They might think that they need to correct something once they open the editor.
If the changes have to be applied once the editor is opened, then maybe better to at least have a Save option back? |
|
@yesil saving the fragment does not resolve the issue. The save button is always enabled, no matter how many times i save it or make a real change and save. The next time i open the fragment, save button is again enabled |
|
@yesil could you please check one thing. When you apply promo on the price from the promo code field, there is no
price on this fragment on your branch does not have it but the promo is obviously applied |




Resolves https://jira.corp.adobe.com/browse/MWPW-188624
Adds grouped-variation preview locale selection in Studio and introduces a per-fragment
compatVersiongate so the new fragment-level promo-code behavior only activates on cards authored after this change.Studio
pznTags.promoCodeas the default promotion code for price rendering and passes it to OST as a contextualpromotionCode, separate from placeholder-levelstoredPromoOverride.promoCodefield changes.compatVersion = 1onto the fragment so re-save migrates it forward.QA Checklist: https://wiki.corp.adobe.com/display/adobedotcom/M@S+Engineering+QA+Use+Cases
Please do the steps below before submitting your PR for a code review or QA
🧪 Nala E2E Tests
Nala tests run automatically when you open this PR.
To run Nala tests again:
run nalalabel to this PR (in the right sidebar)To stop automatic Nala tests:
run nalalabelTest URLs:
Test fragments:
parent: https://mwpw-188624--mas--adobecom.aem.live/studio.html#fragmentId=37620c59-39b7-4340-9042-792aabad8206&page=fragment-editor&path=sandbox
grouped variation: https://mwpw-188624--mas--adobecom.aem.live/studio.html#fragmentId=a010c8e9-683c-4c61-ba09-85ad1337c51f&page=fragment-editor&path=sandbox
compatVersion:1
global promo applied
https://main--da-cc--adobecom.aem.page/drafts/ilyas/grouped-variation?maslibs=mwpw-188624--mas--adobecom&akamaiLocale=IT&mas-geo-detection=on
compatVersion:0
global promo skipped
https://main--da-cc--adobecom.aem.page/drafts/ilyas/grouped-variation?maslibs=mwpw-188624--mas--adobecom&akamaiLocale=FR&mas-geo-detection=on