Jump to content

cumuler des requetes smarty


Recommended Posts

bonsoir

j'aimerais allier les meilleurs ventes et les nouveaux produits sur une meme page

sauriez vous comment les cumuler ?

code best sale.php

<?php

include(dirname(__FILE__).'/config/config.inc.php');
include(dirname(__FILE__).'/header.php');
include(dirname(__FILE__).'/product-sort.php');

$nbProducts = intval(ProductSale::getNbSales());
include(dirname(__FILE__).'/pagination.php');

$smarty->assign(array(
   'products' => ProductSale::getBestSales(intval($cookie->id_lang), intval($p) - 1, intval($n), $orderBy, $orderWay),
   'nbProducts' => $nbProducts));

$smarty->display(_PS_THEME_DIR_.'best-sales.tpl');

include(dirname(__FILE__).'/footer.php');

?>



code new product :

<?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), intval($p) - 1, intval($n), false, $orderBy, $orderWay),
   'nbProducts' => intval($nbProducts)));

$smarty->display(_PS_THEME_DIR_.'new-products.tpl');

include(dirname(__FILE__).'/footer.php');

?>



Dois je manipuler ces deux seules fichiers j'en doute. dois je créer d'autres fichiers ?

Merci pour votre aide

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...