From 9e5de447547b005f3ee5faed92591f1a482e3575 Mon Sep 17 00:00:00 2001 From: junedkazi Date: Fri, 11 Aug 2017 09:23:35 -0700 Subject: [PATCH] STENCIL-3383 Do not show add to cart on disabled products. --- CHANGELOG.md | 1 + .../scss/layouts/products/_productList.scss | 1 + templates/components/products/list-item.html | 21 +++++++++++-------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cad0139259..7b05c77a0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/assets/scss/layouts/products/_productList.scss b/assets/scss/layouts/products/_productList.scss index 12e06f4dd1..8aa84aa9d8 100644 --- a/assets/scss/layouts/products/_productList.scss +++ b/assets/scss/layouts/products/_productList.scss @@ -8,6 +8,7 @@ .productList { @include u-listBullets("none"); + margin: spacing("half"); .product { // scss-lint:disable NestingDepth diff --git a/templates/components/products/list-item.html b/templates/components/products/list-item.html index af06a8adb0..1520eb00fa 100644 --- a/templates/components/products/list-item.html +++ b/templates/components/products/list-item.html @@ -29,17 +29,20 @@

{{#if price}}
{{> components/products/price price=price}}
{{/if}} - {{#unless hide_add_to_cart}} + {{#if show_cart_action}} {{#if has_options}} - {{lang "products.choose_options"}} - {{else}} - {{#if out_of_stock_message }} - {{out_of_stock_message}} - {{else}} - {{lang "products.add_to_cart"}} - {{/if}} + {{lang 'products.choose_options'}} {{/if}} - {{/unless}} + {{#if pre_order}} + {{lang 'products.pre_order'}} + {{/if}} + {{#if add_to_cart_url }} + {{lang 'products.add_to_cart'}} + {{/if}} + {{#if out_of_stock_message }} + {{out_of_stock_message}} + {{/if}} + {{/if}} {{#if show_compare}}