Jump to content

How to make "sold out" instead of faded "add to a cart" when product quantity is 0?


karid

Recommended Posts

Hi all, my customers are confusing when browsing and I dont want to remove my single designs which were sold out as keep them as portfolio but its confusing when they browsing as out of stock only pop up when they open product page. 

Please look at the photo 

Web: www.handmadecards.ie 

20220326_065350.jpg

Link to comment
Share on other sites

Im using prestashop 1.6

Also do someone know how to make photos in catalog bigger to fill all that box on mobile version? I think that I changed that square size for mobile and adjusted it but dont remember how I did it and now the bigger photos don't work on mobile version because I think the box is not square if you know what I mean🙈

Link to comment
Share on other sites

Hi,

prestashop_root/themes/default-bootstrap/product-list.tpl

<div class="button-container">
  {if ...}
    {if (!isset($product.customization_required) || !$product.customization_required) && ($product.allow_oosp || $product.quantity > 0)}
      <a ...>
        {$product.quantity}
        <span>{l s='Add to cart'}</span>
      </a>
    {else}
  	// Changes need to be made here (html or modify Add to cart text with SOLD OUT)
      <span class="button ajax_add_to_cart_button btn btn-default disabled">
        <span>{l s='Add to cart'}</span>
      </span>
  	// end mod
    {/if}
  {/if}
  <a class="button lnk_view btn btn-default" href="{$product.link|escape:'html':'UTF-8'}" title="{l s='View'}">
    <span>{if (isset($product.customization_required) && $product.customization_required)}{l s='Customize'}{else}{l s='More'}{/if}</span>
  </a>
</div>

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...