Jump to content

Edit History

delete-account-pleas

delete-account-pleas

If you are using prestashop classic theme you can do it like this:

Open file YOUR_STORE_NAME/themes/classic/templates/catalog/_partials/productlist.tpl

Change this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
    {/foreach}
</div>

To this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {if $product.quantity > 0 && $page.page_name == "prices-drop"} {* crezzur.com: add check if product has quantity, if not do not display product *}
            {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
        {else}
            {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
        {/if}
    {/foreach}
</div>

 

Now only products with stock will be displayed.

delete-account-pleas

delete-account-pleas

If you are using prestashop classic theme you can do it like this:

Open file YOUR_STORE_NAME/themes/classic/templates/catalog/_partials/productlist.tpl

Change this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
    {/foreach}
</div>

To this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {if $product.quantity > 0 && $page.page_name == "prices-drop"} {* crezzur.com: add check if product has quantity, if not do not display product *}
            {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
        {/if}
    {/foreach}
</div>

 

Now only products with stock will be displayed.

delete-account-pleas

delete-account-pleas

If you are using prestashop classic theme you can do it like this:

Open file YOUR_STORE_NAME/themes/classic/templates/catalog/_partials/productlist.tpl

Change this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
    {/foreach}
</div>

To this:

<div class="products{if !empty($cssClass)} {$cssClass}{/if}" itemscope itemtype="http://schema.org/ItemList">
    {foreach from=$products item="product" key="position"}
        {if $product.quantity > 0} {* crezzur.com: add check if product has quantity, if not do not display product *}
            {include file="catalog/_partials/miniatures/product.tpl" product=$product position=$position}
        {/if}
    {/foreach}
</div>

 

Now only products with stock will be displayed.

×
×
  • Create New...