[Solved] How to delete a once added coupon again?
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
[Solved] How to delete a once added coupon again?
Adding a coupon works. But how can a customer delete the coupon from the basket again, in case (s)he decides differently?
In the "common/summary/detail-standard.php/" template, I set "$modify" to true. But there is another check
that disables vouchers from being removed again.
This has strange consequences, here a scenario:
- customer adds some products,
- customer adds coupon (assigned to one of those products)
- customer decides differently and deletes all products again (once all products are delete, the coupon does not show up either)
- customer adds 1 other product with no coupons assigned to it
- suddenly the coupon appears again (and reduces the price, even though it is assigned to another product)
Am I doing sth wrong? How can I prevent that?
In the "common/summary/detail-standard.php/" template, I set "$modify" to true. But there is another check
Code: Select all
if( ( $product->getFlags() & \Aimeos\MShop\Order\Item\Base\Product\Base::FLAG_IMMUTABLE ) == 0 )
This has strange consequences, here a scenario:
- customer adds some products,
- customer adds coupon (assigned to one of those products)
- customer decides differently and deletes all products again (once all products are delete, the coupon does not show up either)
- customer adds 1 other product with no coupons assigned to it
- suddenly the coupon appears again (and reduces the price, even though it is assigned to another product)
Am I doing sth wrong? How can I prevent that?
Last edited by rowild on 23 Nov 2020, 09:27, edited 1 time in total.
Re: How to delete a once added coupon again?
There's a button for deleting the added coupons in the basket standard component if a coupon has already been added. Check for the HTML code in the original template if you've overwritten that part already in your own template.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star