[amp story shopping] Attachment template logic (original) (raw)
Description
The attachment opening is triggered by clicking the CTA (built into the cta logic already) or a product tag (new logic implemented in #36734).
Upon opening:
- If there is an activeProduct in the store service or only one product on the page, render the PDP.
- If activeProduct is null, render PLP.
Upon closing (closing logic is built into the pageAttachment already):
Clear the activeProduct field in the store service.