Skip to content

Commit 4322273

Browse files
author
David Payne
committed
fix(storefront): STRF-4866 Fix missing quantity/selection for AMP product Page
1 parent 58f218e commit 4322273

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
@@ -1,6 +1,7 @@
11
# Changelog
22

33
## Draft
4+
- Fix quantity edit on Simple Product AMP pages. [#1257](https://github.com/bigcommerce/cornerstone/pull/1257)
45

56
## 2.1.0 (2018-06-01)
67
- Add Newsletter summary section to subscription form. [#1248](https://github.com/bigcommerce/cornerstone/pull/1248)

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)