Jump to content

Possibility to remove Automatic cart rule at some point of Checkout process(At the End)


pl.sabotinov

Recommended Posts

Hello,

Prestashop 1.7.7.5

Is there any possibility to remove from cart the automatically generated voucher (without code) at some end point of the checkout process? Because in this PS 1.7.7.5 automatic vouchers could not be deleted (i know there is a reason for it).

Here the scenario: We have a cart rule that is applied for some conditions and for some payments. But we want to remove it at the end of checkout if specific payment is selected.

Till now i managed to remove this kind of voucher at the validation process of the payment (validation.php) - but this is only possible if the voucher is not automatically applied (has a code - and is highlited and applied from user). Then we use the removeCartRule function from cart. But if the voucher is automatically applied - even at this step the function does not delete the voucher. So is that anywhere or anyhow possible?

Or other nice solution will be if this exact voucher (not automatic - with code) could be applied at some step without user action, but before the last step of checkout so to be visible for the customer. (Something like if (voucher_id not applied by user at step payment/carrier - addCartRule).

regards,

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