[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:

  1. If there is an activeProduct in the store service or only one product on the page, render the PDP.
  2. If activeProduct is null, render PLP.

Upon closing (closing logic is built into the pageAttachment already):
Clear the activeProduct field in the store service.
Screen Shot 2021-11-03 at 12 16 04 PM