Jump to content

override Product.php en 1.5


Recommended Posts

Je tente de faire un override de Product.php avec la version 1.5.3.1 mais il n'est jamais appelé.

(j'en avais fait un qui fonctionnait avec la 1.4.8)

 

Je travaille avec une version 1.5.3.1 installée à partir de zéro.

 

J'ai modifié /classes/stock/StockAvailable.php pour y intégrer le patch de Rémi Gaillard du 16 janvier : http://scm.prestashop.com/changelog/PrestaShop_v.1.5?cs=d0074ed72491292b2ec4b8fe8ceb87f7585c2e72

portant sur : Hook actionUpdateQuantity was not called for product without attributes which depends on the physical stock

 

Il n'y a normalement rien d'autre à faire que surcharger override/classes/Product.php puisque dans la 1.5 sa coquille existe. C'est bien ça.

Qu'aurais-je oublié ?

Merci par avance des regards éclairants sur mon problème.

 

<?php

class Product extends ProductCore
   {
   public static function actionUpdateQuantity($product, $id_order = NULL)
    {
         parent::actionUpdateQuantity($product, $id_order);

	 mon code...

       }
   }

?>

Link to comment
Share on other sites

Bonjour,

 

Si j'ai bien compris la modif en question, il s'agit uniquement de modifier StockAvailable.php pour y insérer un appel manquant

Hook::exec('actionUpdateQuantity',
..........
..........
..........
);

Il ne semble pas y avoir d'override à ajouter en plus...

 

De plus il n'y a pas de fonction actionUpdateQuantity() (il s'agit d'un hook)

A moins que j'ai mal compris.... :blink:

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