Jump to content

(Résolu) Supprimer la pagination pour les marques


Recommended Posts

On peut faire plus propre, mais bon en 30s ...
dans supplier.php, tu cherches le block suivant après le else

else
{
   include(dirname(__FILE__).'/header.php');
   $data = call_user_func(array($className, 'get'.$className.'s'), true, (int)($cookie->id_lang), true);
   $nbProducts = count($data);
   include(dirname(__FILE__).'/pagination.php');

   $data = call_user_func(array($className, 'get'.$className.'s'), true, intval($cookie->id_lang), true, $p, $n);
   $imgDir = $objectType == 'supplier' ? _PS_SUPP_IMG_DIR_ : _PS_MANU_IMG_DIR_;
   foreach ($data AS &$item)
       $item['image'] = (!file_exists($imgDir.'/'.$item['id_'.$objectType].'-medium.jpg')) ? 
           Language::getIsoById(intval($cookie->id_lang)).'-default' :    $item['id_'.$objectType];

   $smarty->assign(array(
       'pages_nb' => ceil($nbProducts / intval($n)),
       'nb'.$className.'s' => $nbProducts,
       'mediumSize' => Image::getSize('medium'),
       $objectType.'s' => $data
   ));



que tu remplaces par ça :

else
{
   include(dirname(__FILE__).'/header.php');
   $data = call_user_func(array($className, 'get'.$className.'s'), true, (int)($cookie->id_lang), true);
   $nbProducts = count($data);
   //include(dirname(__FILE__).'/pagination.php');

   $data = call_user_func(array($className, 'get'.$className.'s'), true, intval($cookie->id_lang), true, $p, $nbProducts);
   $imgDir = $objectType == 'supplier' ? _PS_SUPP_IMG_DIR_ : _PS_MANU_IMG_DIR_;
   foreach ($data AS &$item)
       $item['image'] = (!file_exists($imgDir.'/'.$item['id_'.$objectType].'-medium.jpg')) ? 
           Language::getIsoById(intval($cookie->id_lang)).'-default' :    $item['id_'.$objectType];

   $smarty->assign(array(
       'pages_nb' => ceil($nbProducts / intval($nbProducts)),
       'nb'.$className.'s' => $nbProducts,
       'mediumSize' => Image::getSize('medium'),
       $objectType.'s' => $data
   ));



Tu devrais avoir tout sur une même page

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