required.productcode - Bug?

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
wom-bat
Posts: 6
Joined: 02 Oct 2020, 11:33

required.productcode - Bug?

Post by wom-bat » 02 Oct 2020, 11:42

Hi there,

I just for the first time tried required.productcode. In my understanding, this should define, for which product (code) the coupon can be applied. Now, if I try to use the code on a different product, it says, that this is now allowed, which is good. Then I add the product as mentioned in the required.productcode - which allows me to add the coupon code. However, instead of only discounting the product mentioned in required.productcode - the discount is applied on all products in the basket.

Is this how the coupon is intended to work? How can I make sure, that the coupon only applies to products I want?

Example
Basked contains of
Product A
Product B
Product C
My discount code is "test" (25%)
I add required.productcode: Product B

In the basket, the only discounted article shuld be B

How to realize this?

Thank you in andvance for helping me find the right way.

BR
Samuel

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

Re: required.productcode - Bug?

Post by aimeos » 03 Oct 2020, 07:42

The current Aimeos versions contain a "required.only" setting and if you select "yes", the discount is only applied to the product added in "required.productcode".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

wom-bat
Posts: 6
Joined: 02 Oct 2020, 11:33

Re: required.productcode - Bug?

Post by wom-bat » 05 Oct 2020, 04:56

Hey Admin,

Thank you for your reply. We are not on the most recent version. See attachment. Any possibility to realize what I describe in my first post? To use required.productcode on defined products only?

Best regards
Samuel
Attachments
screenshot.png
screenshot.png (49.92 KiB) Viewed 2861 times

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

Re: required.productcode - Bug?

Post by aimeos » 05 Oct 2020, 07:27

Your configuration must look like (replace "rebate-prodcode" and "required-prodcode" with the product codes of the rebate product and the requried product):
admin-coupon-requiredonly.png
admin-coupon-requiredonly.png (81.15 KiB) Viewed 2856 times
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

wom-bat
Posts: 6
Joined: 02 Oct 2020, 11:33

Re: required.productcode - Bug?

Post by wom-bat » 06 Oct 2020, 14:27

Thank you for your quick answer.

I reconstructed your advice - with the difference, that I used percentrebate.....
So currently the code only works, when the product (in this case J-001) is in the basket. However, if I add another product, (J-002) for example, the rebate is added on the product, too. But my target is to only discound J-002, no other prodcut in the basket.

Am I missing anything?

Thank you in advance for your feedback!

Cheers
Attachments
screenshot.png
screenshot.png (167.81 KiB) Viewed 2833 times

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

Re: required.productcode - Bug?

Post by aimeos » 06 Oct 2020, 14:34

"percentrebate.productcode" and "required.productcode" can't be the same!

percentrebate.productcode -> Code of the rebate product that is added to the basket with negative price
required.productcode -> Code of the product that must be in the basket of the customer to get the rebate
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

wom-bat
Posts: 6
Joined: 02 Oct 2020, 11:33

Re: required.productcode - Bug?

Post by wom-bat » 07 Oct 2020, 06:09

Hi there,

Ok, I do not really see the point of this. But let me try differently.
I do have 5 products I want to discount

J-001
J-002
J-003
J-004
J-005

Beside those, I have many other products in my store. I want to provide one discount code (test_001) that allows a rebate of 20% but on those products only. All other products (if added to the basket) shall not be discounted.

Can I realize this in Aimeos or not?

Best regards and thank you for your replies!

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

Re: required.productcode - Bug?

Post by aimeos » 07 Oct 2020, 06:41

Yes, but your configuration is wrong. If you still have the demo data, "percentrebate.productcode" should be "demo-rebate" and "required.productcode" should be "J-001" with "required.only" equals "yes"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

wom-bat
Posts: 6
Joined: 02 Oct 2020, 11:33

Re: required.productcode - Bug?

Post by wom-bat » 07 Oct 2020, 08:51

Hey Admin,

Great on you. Thank you. First problem resolved. I now understood the point about the rebate product code. This is changed and now displayed correctly in check out. However, whta is not yet working properly is the required.only = yes.
If I add any other product (beside J-001) - the rebate applies on the other product, too.

It should be as follows
J-001 with 20 % rebate
P-001 no rebate
D-002 no rebate

See my current configuration (R-1000) is the 20% Rebate product code.

I am sure, I am missing a point and you can tell me which one.

Tks!
Attachments
screenshot.png
screenshot.png (169.34 KiB) Viewed 2825 times

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

Re: required.productcode - Bug?

Post by aimeos » 07 Oct 2020, 17:18

Which Aimeos version and host application are you using?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply