Skip to content

Commit

Permalink
Merge pull request #1257 from davidwrpayne/STRF-4866
Browse files Browse the repository at this point in the history
fix(storefront): STRF-4866 Fix missing quantity/selection for AMP product Page
  • Loading branch information
David Payne authored Jun 7, 2018
2 parents 58f218e + 4322273 commit c836b96
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

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

## 2.1.0 (2018-06-01)
- Add Newsletter summary section to subscription form. [#1248](https://github.com/bigcommerce/cornerstone/pull/1248)
Expand Down
18 changes: 7 additions & 11 deletions templates/components/amp/products/product-view.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,13 @@
</section>
<div class="productView-action">
{{#or customer (if theme_settings.restrict_to_login '!==' true)}}
{{#if product.options}}
<amp-iframe height="400" width="250"
layout="responsive"
sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals"
resizable
src="{{product.amp_options_url}}">
<div class="button button--primary button--wide" overflow tabindex="0" role="button">Choose Options</div>
</amp-iframe>
{{else}}
<a class="button button--primary button--wide" role="button" href="{{product.cart_url}}">Add To Cart</a>
{{/if}}
<amp-iframe height="400" width="250"
layout="responsive"
sandbox="allow-forms allow-pointer-lock allow-popups allow-same-origin allow-scripts allow-top-navigation allow-modals"
resizable
src="{{product.amp_options_url}}">
<div class="button button--primary button--wide" overflow tabindex="0" role="button">Choose Options</div>
</amp-iframe>
{{/or}}
{{#if product.out_of_stock}}
{{#if product.out_of_stock_message}}
Expand Down
4 changes: 1 addition & 3 deletions templates/pages/amp/product.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
{{#if settings.add_this.buttons}}
<script async custom-element="amp-social-share" src="https://cdn.ampproject.org/v0/amp-social-share-0.1.js"></script>
{{/if}}
{{#if product.options}}
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
{{/if}}
<script async custom-element="amp-iframe" src="https://cdn.ampproject.org/v0/amp-iframe-0.1.js"></script>
{{#if product.videos}}
<script async custom-element="amp-youtube" src="https://cdn.ampproject.org/v0/amp-youtube-0.1.js"></script>
{{/if}}
Expand Down

0 comments on commit c836b96

Please sign in to comment.