Skip to content
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

[amp story shopping] Get and set JSON data #36699

Closed
processprocess opened this issue Nov 1, 2021 · 0 comments · Fixed by #36757
Closed

[amp story shopping] Get and set JSON data #36699

processprocess opened this issue Nov 1, 2021 · 0 comments · Fixed by #36757

Comments

@processprocess
Copy link
Contributor

processprocess commented Nov 1, 2021

Description

  1. amp-story-shopping-config can either have a script child or a src attribute
    a) Inline is always required
    b) If a src is present it will override inline
    c) If remote fails it should fallback to the inline config
  2. Data should be fetched and set in the store service under a new entry called SHOPPING_STATE.
    products should be keyed to shopping state by their product-tag-id value so they can be read without iterating over data. This could follow a similar pattern as the ADD_PANNING_MEDIA_STATE action.
  3. amp-story-shopping-tag should subscribe to SHOPPING_STATE and update its text content with the product-title value.

Validation is not part of this PR. Follow up PRs will validate JSON before setting it. I2I

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants