Skip to content

Commit

Permalink
STENCIL-3383 Do not show add to cart on disabled products.
Browse files Browse the repository at this point in the history
  • Loading branch information
junedkazi committed Aug 11, 2017
1 parent e78e2ce commit 9e5de44
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- Add pointer-event for color and pattern swatches so title tags appear upon hover [#1055](https://github.com/bigcommerce/cornerstone/pull/1055)
- Change the 403 page message to be more friendly [#1057](https://github.com/bigcommerce/cornerstone/pull/1057) & [#1059](https://github.com/bigcommerce/cornerstone/pull/1059)
- Add bulk discount rates to product cards [#1058](https://github.com/bigcommerce/cornerstone/pull/1058)
- Do not show add to cart on disabled products [#1063](https://github.com/bigcommerce/cornerstone/pull/1063)

## 1.9.1 (2017-07-25)
- Move some hard-coded validation messages to language file [#1040](https://github.com/bigcommerce/cornerstone/pull/1040)
Expand Down
1 change: 1 addition & 0 deletions assets/scss/layouts/products/_productList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

.productList {
@include u-listBullets("none");
margin: spacing("half");

.product {
// scss-lint:disable NestingDepth
Expand Down
21 changes: 12 additions & 9 deletions templates/components/products/list-item.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,20 @@ <h4 class="listItem-title">
{{#if price}}
<div class="listItem-price">{{> components/products/price price=price}}</div>
{{/if}}
{{#unless hide_add_to_cart}}
{{#if show_cart_action}}
{{#if has_options}}
<a href="{{url}}" class="button button--primary" data-product-id="{{id}}">{{lang "products.choose_options"}}</a>
{{else}}
{{#if out_of_stock_message }}
<span href="{{url}}" class="button button--primary">{{out_of_stock_message}}</span>
{{else}}
<a href="{{add_to_cart_url}}" class="button button--primary">{{lang "products.add_to_cart"}}</a>
{{/if}}
<a href="{{url}}" class="button button--small" data-product-id="{{id}}">{{lang 'products.choose_options'}}</a>
{{/if}}
{{/unless}}
{{#if pre_order}}
<a href="{{url}}" class="button button--primary">{{lang 'products.pre_order'}}</a>
{{/if}}
{{#if add_to_cart_url }}
<a href="{{add_to_cart_url}}" class="button button--primary">{{lang 'products.add_to_cart'}}</a>
{{/if}}
{{#if out_of_stock_message }}
<a href="{{url}}" class="button button--small" data-product-id="{{id}}">{{out_of_stock_message}}</a>
{{/if}}
{{/if}}
{{#if show_compare}}
<label class="button button--small" for="compare-{{id}}">
{{lang "products.compare"}} <input type="checkbox" name="products[]" value="{{id}}" id="compare-{{id}}" data-compare-id="{{id}}">
Expand Down

0 comments on commit 9e5de44

Please sign in to comment.