Add coupon code for all the products of the basket

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
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Add coupon code for all the products of the basket

Post by ahmed31916 » 02 Sep 2022, 12:03

Hello Aimeos,

I want to make a new coupon code for all the products of the basket by percent rebate. I chosen PercentRebate and add "Basket".
I ignored the "percentrebat.productcode" option (because the coupon for the whole products in the marketplace). Now, when I add the coupon code in the checkout textbox, it return an error message: 'Invalid configuration for coupon provider "PercentRebate,Basket", needs "percentrebate.productcode, percentrebate.rebate"'.

- Is my way to add a new coupon code for all products of the marketplace is wrong? if yes, what is the correct.
- What is "basket.total-value-min" range {"20","50"}? why should I enter range (when put one value, returns saving error).

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

Re: Add coupon code for all the products of the basket

Post by aimeos » 05 Sep 2022, 06:30

ahmed31916 wrote: 02 Sep 2022, 12:03 I ignored the "percentrebat.productcode" option (because the coupon for the whole products in the marketplace). Now, when I add the coupon code in the checkout textbox, it return an error message: 'Invalid configuration for coupon provider "PercentRebate,Basket", needs "percentrebate.productcode, percentrebate.rebate"'.
Ignoring "percentrebat.productcode" leads to the error because it's not the product the rebate is for but the product that will be used to show the rebate value in the basket.
ahmed31916 wrote: 02 Sep 2022, 12:03 - What is "basket.total-value-min" range {"20","50"}? why should I enter range (when put one value, returns saving error).
Required values are explained here:
https://aimeos.org/docs/latest/manual/c ... sketvalues
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: Add coupon code for all the products of the basket

Post by ahmed31916 » 05 Sep 2022, 07:23

all the providers requires the productcode, while I want to add all the products (not a specific product).

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

Re: Add coupon code for all the products of the basket

Post by aimeos » 06 Sep 2022, 08:47

Like said, the productcode configuration has nothing to do with the products the discount is applied to.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
ahmed31916
Advanced
Posts: 148
Joined: 14 Apr 2022, 12:15

Re: Add coupon code for all the products of the basket

Post by ahmed31916 » 08 Sep 2022, 08:09

aimeos wrote: 06 Sep 2022, 08:47 Like said, the productcode configuration has nothing to do with the products the discount is applied to.
Sorry, I have a misunderstanding at this point. Why I need to add a specific product code to apply a discount.
I shouldn't write a product code when I need to apply the discount to all of the products.

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

Re: Add coupon code for all the products of the basket

Post by aimeos » 09 Sep 2022, 07:01

In the basket, the rebates is displayed as separate line like other products. To have control over the name and image of that rebate product in the basket, you have to configure "percentrebate.productcode", which is the SKU of that rebate product.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply