dimanche 28 octobre 2018

Check if product is in cart - Prestashop 1.7.4.2

I'm facing a problem with prestashop 1.7.4.2. I want to check if certain product ID is in cart before to allow customer proceeds checkout. If not, I want to display an alert.

In 1.6, I could achieve this with : {if !Context::getContext()->cart->containsProduct(784)} message {/if}

It doesn't work in 1.7.4.2...

Any help will be greatly appreciated ! Thanks a lot & cheers !

Camille.

Aucun commentaire:

Enregistrer un commentaire