beed Posted May 23, 2011 Share Posted May 23, 2011 Hi,i would like to know how to go about creating a page title "all products" which will display every product in my shop, in rows of three. I have created a products.php file and products.tpl file from an example, which creates the new page. However i would like to know the best way to populate this with every product. My code:Products.php <?php include(dirname(__FILE__).'/config/config.inc.php'); include(dirname(__FILE__).'/header.php'); include(dirname(__FILE__).'/product-sort.php'); $nbProducts = intval(Product::getNewProducts(intval($cookie->id_lang), isset($p) ? intval($p) - 1 : NULL, isset($n) ? intval($n) : NULL, true)); include(dirname(__FILE__).'/pagination.php'); $smarty->assign(array( 'products' => Product::getNewProducts(intval($cookie->id_lang), 0, 10, false, $orderBy, $orderWay), 'nbProducts' => intval($nbProducts))); $smarty->display(_PS_THEME_DIR_.'products.tpl'); include(dirname(__FILE__).'/footer.php'); ?> Products.tpl capture name=path}{l s='products'}{/capture} {include file=$tpl_dir./breadcrumb.tpl} {l s='products'} {if $products} {include file=$tpl_dir./product-sort.tpl} {include file=$tpl_dir./product-list.tpl products=$products} {include file=$tpl_dir./pagination.tpl} {else} {l s='No products.'} {/if} Link to comment Share on other sites More sharing options...
Gabeszazegyetlen Posted July 7, 2011 Share Posted July 7, 2011 Hy!!This is not working.And 1.4 PS????How can I do? Link to comment Share on other sites More sharing options...
topanaprilia Posted October 17, 2011 Share Posted October 17, 2011 Yeah this is not work for prestashop 1.4.4. are you have new idea,,? Link to comment Share on other sites More sharing options...
Recommended Posts