Hello,
Right now we have this fix to display product availability.
{if {$product->quantity} < 1} <div class="cj-outstock"> <img src="https://bollnasbilvard.se/img/cms/Ikoner/yellow.png" alt="Delivery" width="20" height="20"> {$product.availability_message} </div> {else} <div class="cj-instock"> <img src="https://bollnasbilvard.se/img/cms/Ikoner/green.png" alt="Delivery" width="20" height="20"> I lager </div> {/if}
This is because if you have a product that is Out of stock, but still buyable, Prestashop will still display a green checker, which is a bit misleading, even though you change the text. That why we want a Yellow checker / icon when a product is out of stock, but still buyable. And a green when it's in stock. I know its a basic and flawed solution.
The problem is when you have a product with combinations, if you select a combination that is Out of stock, the availability message does not update, until you refresh the whole page, then the availability message refreshes. Does anyone have a solution for this or maybe a better solution with the original availability message.
Product example:
https://www.bollnasbilvard.se/foam-lance/6393-612-bbv-foam-lance-dysa.html#/153-diameter-150_mm
1. Try changing to 1,50mm that is out of stock.
2. Refresh page.
3.Select another in stock option.
Thanks in advance
Original:
<span id="product-availability"> {if $product.show_availability && $product.availability_message} {if $product.availability == 'available' || {$product->quantity} < 1} <i class="material-icons rtl-no-flip product-available"></i> {elseif $product.availability == 'last_remaining_items'} <i class="material-icons product-last-items"></i> {else} <i class="material-icons product-unavailable"></i> {/if} {$product.availability_message} {/if} </span>