Skip to content

Commit

Permalink
Merge pull request #1551 from bookernath/fix-clickable-figure
Browse files Browse the repository at this point in the history
Fix bug where image is not clickable in product card
  • Loading branch information
bookernath authored Jul 25, 2019
2 parents abcb529 + 3bf0eaf commit 159f18c
Show file tree
Hide file tree
Showing 2 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
Expand Up @@ -14,6 +14,7 @@
- Prevent heading from displaying when no price ranges are available [#1545](https://github.com/bigcommerce/cornerstone/pull/1545)
- Utilize srcset for responsive images [#1507](https://github.com/bigcommerce/cornerstone/pull/1507)
- Clean up conditional logic in a couple component templates [#1547](https://github.com/bigcommerce/cornerstone/pull/1547)
- Remove "demo" product conditional logic [#1551](https://github.com/bigcommerce/cornerstone/pull/1551)

## 3.5.1 (2019-06-24)
- Fix conditional logic in share.html [#1522](https://github.com/bigcommerce/cornerstone/pull/1522)
Expand Down
22 changes: 8 additions & 14 deletions templates/components/products/card.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</div>
{{/if}}
{{/or}}
{{#if demo}}<a href="{{url}}" {{#if settings.data_tag_enabled}} data-event-type="product-click" {{/if}}>{{/if}}
<a href="{{url}}" {{#if settings.data_tag_enabled}} data-event-type="product-click" {{/if}}>
<div class="card-img-container">
{{> components/common/responsive-img
image=image
Expand All @@ -26,19 +26,17 @@
default_image=theme_settings.default_image_product
}}
</div>
{{#if demo}}</a>{{/if}}
</a>

<figcaption class="card-figcaption">
<div class="card-figcaption-body">
{{#unless hide_product_quick_view}}
{{#if theme_settings.show_product_quick_view}}
{{#unless demo}}
{{#if settings.data_tag_enabled}}
<a class="button button--small card-figcaption-button quickview" data-event-type="product-click" data-product-id="{{id}}">{{lang 'products.quick_view'}}</a>
{{else}}
<a class="button button--small card-figcaption-button quickview" data-product-id="{{id}}">{{lang 'products.quick_view'}}</a>
{{/if}}
{{/unless}}
{{#if settings.data_tag_enabled}}
<a class="button button--small card-figcaption-button quickview" data-event-type="product-click" data-product-id="{{id}}">{{lang 'products.quick_view'}}</a>
{{else}}
<a class="button button--small card-figcaption-button quickview" data-product-id="{{id}}">{{lang 'products.quick_view'}}</a>
{{/if}}
{{/if}}
{{/unless}}
{{#if show_compare}}
Expand Down Expand Up @@ -77,11 +75,7 @@
<p class="card-text" data-test-info-type="brandName">{{brand.name}}</p>
{{/if}}
<h4 class="card-title">
{{#if demo}}
{{name}}
{{else}}
<a href="{{url}}" {{#if settings.data_tag_enabled}} data-event-type="product-click" {{/if}}>{{name}}</a>
{{/if}}
<a href="{{url}}" {{#if settings.data_tag_enabled}} data-event-type="product-click" {{/if}}>{{name}}</a>
</h4>

<div class="card-text" data-test-info-type="price">
Expand Down

0 comments on commit 159f18c

Please sign in to comment.