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

added unique id for swatch options #1347

Merged
1 commit merged into from Sep 21, 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
Expand Up @@ -9,6 +9,7 @@
- Fixed amp page error related to store logo [#1323](https://github.com/bigcommerce/cornerstone/pull/1323)
- Add link to order status in account menu when viewing order [#1343](https://github.com/bigcommerce/cornerstone/pull/1343)
- Update cart when quantity changed manually (without using the increase and decrease arrows). [#1338](https://github.com/bigcommerce/cornerstone/pull/1338)
- Fix option set. Selection from option set that containes multiple similar options. [1347] (https://github.com/bigcommerce/cornerstone/pull/1347)

## 2.3.2 (2018-08-17)
- Fix zoom behavior for small images in gallery (turn off zoom if image is too small). [#1325](https://github.com/bigcommerce/cornerstone/pull/1325)
Expand Down
8 changes: 4 additions & 4 deletions templates/components/products/options/product-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
type="radio"
name="attribute[{{../id}}]"
value="{{id}}"
id="attribute_productlist_{{id}}"
id="attribute_productlist_{{../id}}_{{id}}"
{{#if selected}}
checked
data-default
{{/if}}
{{#if ../required}}required{{/if}}>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_productlist_{{id}}">{{label}}</label>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_productlist_{{../id}}_{{id}}">{{label}}</label>
</div>
</li>
{{/each}}
Expand All @@ -61,10 +61,10 @@
type="radio"
name="attribute[{{../id}}]"
value="{{id}}"
id="attribute_productlist_{{id}}"
id="attribute_productlist_{{../id}}_{{id}}"
{{#if selected}}checked{{/if}}
{{#if ../required}}required{{/if}}>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_productlist_{{id}}">{{label}}</label>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_productlist_{{../id}}_{{id}}">{{label}}</label>
{{/each}}
{{/if}}
</div>
4 changes: 2 additions & 2 deletions templates/components/products/options/set-radio.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<input
class="form-radio"
type="radio"
id="attribute_radio_{{id}}"
id="attribute_radio_{{../id}}_{{id}}"
name="attribute[{{../id}}]"
value="{{id}}"
{{#if selected}}
checked
data-default
{{/if}}
{{#if ../required}}required{{/if}}>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_radio_{{id}}">{{this.label}}</label>
<label data-product-attribute-value="{{id}}" class="form-label" for="attribute_radio_{{../id}}_{{id}}">{{this.label}}</label>
{{/each}}
</div>
4 changes: 2 additions & 2 deletions templates/components/products/options/set-rectangle.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
<input
class="form-radio"
type="radio"
id="attribute_rectangle_{{id}}"
id="attribute_rectangle__{{../id}}_{{id}}"
name="attribute[{{../id}}]"
value="{{id}}"
{{#if selected}}
checked
data-default
{{/if}}
{{#if ../required}}required{{/if}}>
<label class="form-option" for="attribute_rectangle_{{id}}" data-product-attribute-value="{{id}}">
<label class="form-option" for="attribute_rectangle__{{../id}}_{{id}}" data-product-attribute-value="{{id}}">
<span class="form-option-variant">{{this.label}}</span>
</label>
{{/each}}
Expand Down
4 changes: 2 additions & 2 deletions templates/components/products/options/swatch.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</label>

{{#each this.values}}
<input class="form-radio" type="radio" name="attribute[{{../id}}]" value="{{id}}" id="attribute_swatch_{{id}}" {{#if selected}}checked data-default{{/if}} {{#if ../required}}required{{/if}}>
<label class="form-option form-option-swatch" for="attribute_swatch_{{id}}" data-product-attribute-value="{{id}}">
<input class="form-radio" type="radio" name="attribute[{{../id}}]" value="{{id}}" id="attribute_swatch_{{../id}}_{{id}}" {{#if selected}}checked data-default{{/if}} {{#if ../required}}required{{/if}}>
<label class="form-option form-option-swatch" for="attribute_swatch_{{../id}}_{{id}}" data-product-attribute-value="{{id}}">
{{#if image}}
<span class='form-option-variant form-option-variant--pattern' title="{{this.label}}" style="background-image: url('{{getImage image "swatch_option_size"}}');"></span>
{{/if}}
Expand Down