Jump to content

[RESOLU] module liste de cadeaux (whishlist) PS Version 1.2


Célia

Recommended Posts

Bonjour tout le monde,

petit soucis d'erreur mysql avec ce module sur la dernière version de Prestashop Version 1.2.0.8
j'ai créé un compte client / ajouté un produit à la liste de cadeaux / voulu le supprimer avec la corbeille dans le bloc à droite... et là horreur voici le beau message débordant de ma boite :


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'JOIN `ps_wishlist_product` pc ON (wp.id_wishlist_product = wpc.id_wishlist_produ' at line 2

       DELETE FROM `ps_wishlist_product_cart` wpc
       JOIN `ps_wishlist_product` pc ON (wp.id_wishlist_product = wpc.id_wishlist_product)
       WHERE `wp.id_wishlist` = 1
       AND `wp.id_product` = 9
       AND `wp.id_product_attribute` = 0




Quelqu'un saurait-il le correctif à appliquer ? Merci ;-)

10689_TUqqo2DQKrnHsXjeQifZ_t

Link to comment
Share on other sites

Change

      return (Db::getInstance()->Execute('
       DELETE FROM `'._DB_PREFIX_.'wishlist_product_cart` wpc
       JOIN `'._DB_PREFIX_.'wishlist_product` pc ON (wp.id_wishlist_product = wpc.id_wishlist_product)
       WHERE `wp.id_wishlist` = '.intval($id_wishlist).'
       AND `wp.id_product` = '.intval($id_product).'
       AND `wp.id_product_attribute` = '.intval($id_product_attribute)));
   }




on line 385 in WishList.php with this:


return (Db::getInstance()->Execute('
       DELETE wpc.*,wp.* FROM `'._DB_PREFIX_.'wishlist_product_cart` AS wpc
       JOIN `'._DB_PREFIX_.'wishlist_product` AS wp ON (wp.id_wishlist_product = wpc.id_wishlist_product)
       WHERE wp.id_wishlist = '.intval($id_wishlist).'
       AND wp.id_product = '.intval($id_product).'
       AND wp.id_product_attribute = '.intval($id_product_attribute)));
   }




It seems to work.

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