vouchers

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

vouchers

Post by mahammadareef » 03 Apr 2023, 07:39

when I apply any coupon to my cart it will show in my cart and consider as item and it will be ordered as well how can I prevent happening, I don't want vouchers to be considered cart items

User avatar
aimeos
Administrator
Posts: 7908
Joined: 01 Jan 1970, 00:00

Re: vouchers

Post by aimeos » 07 Apr 2023, 07:58

Sorry, it does only work that way because we have to track discount values somewhere. Maybe you can change the common summary details template and hide all immutable products (which are almost always discounts) and add their values to the total youself:
https://github.com/aimeos/ai-client-htm ... l.php#L165
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
mahammadareef
Posts: 54
Joined: 14 Oct 2022, 11:54

Re: vouchers

Post by mahammadareef » 12 Apr 2023, 07:23

please explain me the steps how i can do this

User avatar
aimeos
Administrator
Posts: 7908
Joined: 01 Jan 1970, 00:00

Re: vouchers

Post by aimeos » 17 Apr 2023, 08:20

Check for the immutable flag like in the linked line of the template:

Code: Select all

if( ( $product->getFlags() & \Aimeos\MShop\Order\Item\Product\Base::FLAG_IMMUTABLE ) == 0 )
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply