Voucher issue

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!
DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Voucher issue

Post by DmS » 17 Sep 2021, 09:07

Hi.
I've setup a voucher in admin according to the docs here https://aimeos.org/docs/2021.x/manual/coupons/#voucher , connected it to a reduction-product.

I can purchase the voucher, I get the mail with the code for the voucher.
But when I enter it in the Coupons in the basket, I get "Coupon is not available any more"

Looking in the db, the voucher I created is in the table mshop_coupon and seems correct
In the table mshop_coupon_code I can see the different vouchers I've bought, but all of them refer to the demo-voucher that came with the install, even though I did not purchase that one, and both that one and it's reduction product was disabled.

I've deleted my own voucher and tested the demo voucher instead, then the code is found, but now I'm getting No item found for conditions: Array ( [product.code] => demo-rebate ) as I validate the code.

What am I missing here
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

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

Re: Voucher issue

Post by aimeos » 17 Sep 2021, 19:14

DmS wrote: 17 Sep 2021, 09:07 I can purchase the voucher, I get the mail with the code for the voucher.
But when I enter it in the Coupons in the basket, I get "Coupon is not available any more"
Can you post screenshots of your voucher configuration and the configured voucher product from the admin backend?
DmS wrote: 17 Sep 2021, 09:07 I've deleted my own voucher and tested the demo voucher instead, then the code is found, but now I'm getting No item found for conditions: Array ( [product.code] => demo-rebate ) as I validate the code.
You have deleted the voucher product from the demo setup and you need to create a new one now which you can refer to in your voucher configuration.

Here's the documentation about the voucher product:
https://aimeos.org/docs/latest/manual/p ... /#vouchers
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Voucher issue

Post by DmS » 20 Sep 2021, 07:52

aimeos wrote: 17 Sep 2021, 19:14 Can you post screenshots of your voucher configuration and the configured voucher product from the admin backend?
-> Attached
DmS wrote: 17 Sep 2021, 09:07 I've deleted my own voucher and tested the demo voucher instead, then the code is found, but now I'm getting No item found for conditions: Array ( [product.code] => demo-rebate ) as I validate the code.
You have deleted the voucher product from the demo setup and you need to create a new one now which you can refer to in your voucher configuration.

-> No, not exactly.
At first, I created a new type voucher under Marketing->Vouchers and deactivated the demo-one.
When I created a new voucher-product, and purchased that one, the codes was generated with a reference-id to the original, disabled demo-voucher.

Then I reenabled the demo voucher and deleted the one I created, and tried with the original demo-voucher.
Now I can purchase a demo voucher, then add the voucher code from that one in a purchase, but I'm getting the error "No item found for conditions: Array ( [product.code] => demo-rebate )" for the original demo-voucher. So it's the original demo-voucher that does not work. The one I created did not work either, but with a completely different error.

Here's the documentation about the voucher product:
https://aimeos.org/docs/latest/manual/p ... /#vouchers
Yes, I've read that, multiple times. Doesn't really help me to understand this issue.
Attachments
Screenshot 2021-09-20 at 09.40.15.png
Screenshot 2021-09-20 at 09.40.15.png (110.98 KiB) Viewed 1691 times
Screenshot 2021-09-20 at 09.40.31.png
Screenshot 2021-09-20 at 09.40.31.png (122.76 KiB) Viewed 1691 times
Screenshot 2021-09-20 at 09.40.45.png
Screenshot 2021-09-20 at 09.40.45.png (120.34 KiB) Viewed 1691 times
Screenshot 2021-09-20 at 09.40.01.png
Screenshot 2021-09-20 at 09.40.01.png (100 KiB) Viewed 1691 times
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

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

Re: Voucher issue

Post by aimeos » 21 Sep 2021, 14:05

There's also a video at our YouTube channel describing the correct setup:
https://www.youtube.com/watch?v=4OOrpv2bDUo
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Voucher issue

Post by DmS » 21 Sep 2021, 15:19

I've seen that as well.
I can create it and purchase it.
But when I try to use the voucher code I get in the mail, regardless if I created the voucher myself, or if I used the demo voucher that came with the install, I'm getting:

Code: Select all

No item found for conditions: Array ( [product.code] => demo-rebate ) 
in the basket when I add the code
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Voucher issue

Post by DmS » 22 Sep 2021, 15:44

-not sure why, but after having run

Code: Select all

php artisan optimize
for another reason, it started working.
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

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

Re: Voucher issue

Post by aimeos » 22 Sep 2021, 15:47

Most likely you ran the Aimeos setup again, so the "demo-rebate" product has been recreated.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

DmS
Posts: 56
Joined: 09 Aug 2021, 08:59

Re: Voucher issue

Post by DmS » 23 Sep 2021, 07:16

Nope. I did not.
And the demo-rebate product was never deleted, or changed, just disabled for a while, then re-enabled.
But anyways, it now works.
_____________
Laravel 8 with Aimeos 2021.10.7 + Marketplace. Setup via composer. Mac with Valet and MySql 8.0.25

Post Reply