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

fix(storefront): STRF-4866 Fix missing quantity/selection for AMP product Page #1257

Merged
merged 1 commit into from
Jun 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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