Adding Required Field to Product to Purchase

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!
MasonB
Posts: 1
Joined: 23 Jan 2024, 19:48

Adding Required Field to Product to Purchase

Post by MasonB » 23 Jan 2024, 20:43

I want to add a text box to a product that a customer must fill out before they can purchase a product, but I'm not sure how. The text entry required is their player ID, so I want to make sure customers cannot miss putting in this information as it will make organizing and running events much easier for the players and for us organizers. Thanks for the help in advance!

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

Re: Adding Required Field to Product to Purchase

Post by aimeos » 25 Jan 2024, 14:08

Add an attribute of type "custom" with value "text" to your product:
https://aimeos.org/docs/latest/manual/p ... cteristics

Then, overwrite the attribute partial in your own extension and add "required" for all custom attributes:
https://github.com/aimeos/ai-client-htm ... e.php#L221
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply