diff --git a/CHANGELOG.md b/CHANGELOG.md index 61843b3a91..3994c0dd58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Draft +- Fix a bug that was not updating price and weight when an option is selected [#963](https://github.com/bigcommerce/cornerstone/pull/963) ## 1.6.1 (2017-03-14) - Fix a bug that was preventing opening the cart preview modal [#960](https://github.com/bigcommerce/cornerstone/pull/960) diff --git a/assets/js/theme/product.js b/assets/js/theme/product.js index 2d54da83bc..12652a8c34 100644 --- a/assets/js/theme/product.js +++ b/assets/js/theme/product.js @@ -33,7 +33,7 @@ export default class Product extends PageManager { // Init collapsible collapsibleFactory(); - this.productDetails = new ProductDetails($('.productView-options'), this.context, window.BCData.product_attributes); + this.productDetails = new ProductDetails($('.productView'), this.context, window.BCData.product_attributes); videoGallery(); diff --git a/templates/components/amp/products/product-options.html b/templates/components/amp/products/product-options.html index 71f7710c1e..441c8b5d40 100644 --- a/templates/components/amp/products/product-options.html +++ b/templates/components/amp/products/product-options.html @@ -1,21 +1,23 @@ -
-
- - - {{#each product.customizations}} - {{{dynamicComponent 'components/products/customizations'}}} - {{/each}} -
- {{#each product.options}} - {{{dynamicComponent 'components/products/options'}}} +
+
+ + + + {{#each product.customizations}} + {{{dynamicComponent 'components/products/customizations'}}} {{/each}} -
- {{#if product.event_date}} - {{> components/products/event-date}} - {{/if}} - {{#if product.can_purchase}} - {{> components/products/add-to-cart}} - {{/if}} -
- +
+ {{#each product.options}} + {{{dynamicComponent 'components/products/options'}}} + {{/each}} +
+ {{#if product.event_date}} + {{> components/products/event-date}} + {{/if}} + {{#if product.can_purchase}} + {{> components/products/add-to-cart}} + {{/if}} +
+ +