Skip to content

Commit

Permalink
Fix bug where image is not clickable in product card
Browse files Browse the repository at this point in the history
  • Loading branch information
bookernath committed Jul 25, 2019
1 parent abcb529 commit e44a301
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
- Remove head.rsslinks [#1539](https://github.com/bigcommerce/cornerstone/pull/1539)
- 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)
- Clean up conditional logic in a couple component templates [#1547](https://github.com/bigcommerce/cornerstone/pull/1547)- 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 e44a301

Please sign in to comment.