Selection / Variant product add to cart

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!
ttyy
Posts: 10
Joined: 02 Apr 2021, 16:31

Selection / Variant product add to cart

Post by ttyy » 07 May 2021, 09:20

I have a general question about "Add to Cart" functionality on the variant product type.
facet search and product page has "add to cart" button, but unless you'll select an option for the particular variation of the product you are getting - "No unique article found for selected attributes and product ID "***" " error message.

Is there a way to have a default value for the variation option?

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

Re: Selection / Variant product add to cart

Post by aimeos » 07 May 2021, 11:22

Not by default but you can overwrite the "Select" basket frontend decorator and use the first returned variant:
https://github.com/aimeos/ai-controller ... #L194-L198
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

ttyy
Posts: 10
Joined: 02 Apr 2021, 16:31

Re: Selection / Variant product add to cart

Post by ttyy » 12 May 2021, 10:10

Great thank you for help!

Post Reply