Prestashop 1.7.6 cart rules - javascript in cart-detailed-actions.tpl
Budget: €8 – €30 EUR
Hello, I need a js code who will examinate cart product
if the condition are ok = do nothing
if error = diseable checkout btn + display error message.
Here are the detail condition :
in cart-detailed-actions.tpl form prestashop 1.7.6 classic theme
if cart contain product from category id='52',
cart must have amount > 300€ with product from category id=4 or 32 or 8 or 46 or 30 or 78
to be able to finish the order
if not :
$('.checkout .btn-primary').addClass('disabled') + display a error message
example :
if cart total amount = 450€, as 1 product from category_id=52 for amount=100€, and 2 product from category 4 for amount=350€, then do nothing
if cart total amount = 450€, as 2 product from category_id=52 for amount=200€, and 1 product from category 4 and 1 product form category 32 for amount=250€, then disabled checkout button and display error message in cart-detailed-actions.tpl
Be careful, we need to calculate the amount in € from product from category id=4 or 32 or 8 or 46 or 30 or 78 combined
if you have 6 product, each with price=10€, each from on of those category, we will have amount=60€
if the condition are ok = do nothing
if error = diseable checkout btn + display error message.
Here are the detail condition :
in cart-detailed-actions.tpl form prestashop 1.7.6 classic theme
if cart contain product from category id='52',
cart must have amount > 300€ with product from category id=4 or 32 or 8 or 46 or 30 or 78
to be able to finish the order
if not :
$('.checkout .btn-primary').addClass('disabled') + display a error message
example :
if cart total amount = 450€, as 1 product from category_id=52 for amount=100€, and 2 product from category 4 for amount=350€, then do nothing
if cart total amount = 450€, as 2 product from category_id=52 for amount=200€, and 1 product from category 4 and 1 product form category 32 for amount=250€, then disabled checkout button and display error message in cart-detailed-actions.tpl
Be careful, we need to calculate the amount in € from product from category id=4 or 32 or 8 or 46 or 30 or 78 combined
if you have 6 product, each with price=10€, each from on of those category, we will have amount=60€