Jump to content

Erreur Warning: asort() .....boolean given in .../modules/tmspecials.php


Recommended Posts

Bonjour,

 

Je suis sur Prestashop 1.5.2.

 

Je suis en train d'importer mes produits avec Prestapricing et maintenant, j'ai une erreur:

Warning: asort() expects parameter 1 to be array, boolean given in /home/www/modules/tmspecials/tmspecials.php on line 57

 

J'ai trouvé le même topic sur le forum presta anglophone mais pas de réponses.

 

J'ai trouvé un début de solution http://www.prestasho...duits-et-ordre/

 

Je fais donc la modification dans tmspecials.php en mettant :

public function hookHome($params)
{
 if (Configuration::get('PS_CATALOG_MODE'))
  return ;
 global $smarty;
 $tmp = Product::getPricesDrop(intval($params['cookie']->id_lang), 0, '12', false, '', 'ASC');
 asort($tmp);
 if (!$special = Product::getPricesDrop((int)($params['cookie']->id_lang), 0, '12', false, '', 'ASC') AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
  return;
 $smarty->assign(array(
  'special' => $special,
  'specials' => $tmp,
  'products' => Product::getPricesDrop(intval($params['cookie']->id_lang), 0, '12', false, '', 'ASC'),
  'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2)
 ));
 return $this->display(__FILE__, 'tmspecials.tpl');
}

 

Je recompile et vide le cache mais toujours la même erreur...

 

Si quelqu'un peu m'aider svp parce que là je vois pas...

Link to comment
Share on other sites

Bonjour,

 

Oui le mode debug est activé. J'ai la version 1.5.2 de Prestashop. Je suis en train de rentrer des produits avec Prestapricing. On dirai que ce bloc de promotions est tout perturbé...

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