ampproject / ampproject/amphtml

[amp story shopping] Price discount / badge

Open
#37,949 2 comments 0 reactions 1 assignee Claimed by @processprocess View on GitHub
Component: amp-story-shopping P3: When Possible Stale Type: Feature Request WG: stories
Dominant language
JavaScript
Stars
14.9k
Forks
4.1k
PR merge metrics
No merged PRs in 30d

Description

### Description

Enable a slashed out price.

Screen Shot 2022-03-24 at 2 40 20 PM

An `originalPrice` field could be added to the config. "price" seems like it should always be the active price.

Badge UX will need to be finalized. This could be a set list of strings like "discounted" or "two days only".

~~Look into possibility of updating this like amp-list, where it only updates a section of the data so it's always up-to-date.
This can be accomplished by using a `src` attribute and updating the data but there is interest in understanding if just a piece of the template can be updated.~~
The recommended approach for this is to use the `src` attribute instead of updating the inline JSON.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.