prestashop show all products code example

Example 1: prestashop show all products in category

{if !empty($smarty.get.order)}
        {capture assign='ordering'}order={$smarty.get.order}&{/capture}
    {else}
        {assign var='ordering' value=''}
    {/if}

    {if !empty($smarty.get.resultsPerPage)}
        {assign var='results_per_page' value=$smarty.get.resultsPerPage}
    {else}
        {assign var='results_per_page' value=25}
    {/if}

Example 2: prestashop show all products in category

if ($resultsPerPage <= 0 || $resultsPerPage > 100) {
    $resultsPerPage = Configuration::get('PS_PRODUCTS_PER_PAGE');
}

Tags:

Php Example