diff --git a/templates/catalog/_partials/product-add-to-cart.tpl b/templates/catalog/_partials/product-add-to-cart.tpl index 1b765eda..331763f0 100644 --- a/templates/catalog/_partials/product-add-to-cart.tpl +++ b/templates/catalog/_partials/product-add-to-cart.tpl @@ -6,19 +6,40 @@ {if !$configuration.is_catalog}
{block name='product_availability'} - +
{if $product.show_availability && $product.availability_message} - {if $product.availability == 'available'} - + + {** 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'} + {assign 'availability_icon' 'E002'} + {assign 'availability_color' 'warning'} {elseif $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_delivery_times'}