diff --git a/_dev/css/components/products.scss b/_dev/css/components/products.scss index 5ca2dc1e..6c5104ca 100644 --- a/_dev/css/components/products.scss +++ b/_dev/css/components/products.scss @@ -621,20 +621,20 @@ margin-top: 0.625rem; font-weight: 700; - .material-icons { - line-height: inherit; - } - - .product-available { - color: $brand-success; + .alert { + font-size: 1rem; } - .product-unavailable { - color: $brand-warning; + .alert-content-wrapper { + display: flex; + gap: 0.75rem; } - .product-last-items { - color: $brand-warning; + /* Reset some of the general styles on alert warning */ + .alert-warning .material-icons { + padding-top: 0; + margin-right: 0; + font-size: 24px; } } diff --git a/templates/catalog/_partials/product-add-to-cart.tpl b/templates/catalog/_partials/product-add-to-cart.tpl index 2e513129..74d93139 100644 --- a/templates/catalog/_partials/product-add-to-cart.tpl +++ b/templates/catalog/_partials/product-add-to-cart.tpl @@ -66,18 +66,35 @@ {/block} {block name='product_availability'} - +
{if $product.show_availability && $product.availability_message} - {if $product.availability == 'available'} - - {elseif $product.availability == 'last_remaining_items'} - + + {** First, we prepare the icons and colors we want to use *} + {if $product.availability == 'in_stock'} + {assign 'availability_icon' 'E5CA'} + {assign 'availability_color' 'success'} + {elseif $product.availability == 'available' || $product.availability == 'last_remaining_items'} + {assign 'availability_icon' 'E002'} + {assign 'availability_color' 'warning'} {else} - + {assign 'availability_icon' 'E14B'} + {assign 'availability_color' 'danger'} {/if} - {$product.availability_message} + + {** And render the availability message with icon *} + {/if} - +
{/block} {block name='product_minimal_quantity'}