Skip to content

Commit c3acff8

Browse files
authored
Merge pull request #1242 from davidwrpayne/STRF-4866
fix(storefront): STRF-4866 Fix missing quantity/selection for AMP product Page
2 parents 1acb31e + bf19a26 commit c3acff8

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- Fix product pricing schema.org microdata. [#1233](https://github.com/bigcommerce/cornerstone/pull/1233)
1111
- Removed unused browserlist. [#1241](https://github.com/bigcommerce/cornerstone/pull/1241)
1212
- Fix for ESLint "no-console" warning. [#1237](https://github.com/bigcommerce/cornerstone/pull/1237)
13+
- Fix quantity edit on Simple Product AMP pages. [#1242](https://github.com/bigcommerce/cornerstone/pull/1242)
1314

1415
## 1.18.0 (2018-05-09)
1516
- Add the +/- icons for the category filtering [#1211](https://github.com/bigcommerce/cornerstone/pull/1211)

templates/components/amp/products/product-view.html

+7-11
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,13 @@
2828
</section>
2929
<div class="productView-action">
3030
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
31-
{{#if product.options}}
32-
<amp-iframe height="400" width="250"
33-
layout="responsive"
34-
sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals"
35-
resizable
36-
src="{{product.amp_options_url}}">
37-
<div class="button button--primary button--wide" overflow tabindex="0" role="button">Choose Options</div>
38-
</amp-iframe>
39-
{{else}}
40-
<a class="button button--primary button--wide" role="button" href="{{product.cart_url}}">Add To Cart</a>
41-
{{/if}}
31+
<amp-iframe height="400" width="250"
32+
layout="responsive"
33+
sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals"
34+
resizable
35+
src="{{product.amp_options_url}}">
36+
<div class="button button--primary button--wide" overflow tabindex="0" role="button">Choose Options</div>
37+
</amp-iframe>
4238
{{/or}}
4339
{{#if product.out_of_stock}}
4440
{{#if product.out_of_stock_message}}

templates/pages/amp/product.html

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@
1616
{{#if settings.add_this.buttons}}
1717
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
1818
{{/if}}
19-
{{#if product.options}}
20-
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
21-
{{/if}}
19+
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
2220
{{#if product.videos}}
2321
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
2422
{{/if}}

0 commit comments

Comments
 (0)