Best method for adding selection error message?
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!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Best method for adding selection error message?
Laravel 10, Berlin Theme
We have begun to move products from Magento into Aimeos. One area we want to customize is the error message displayed when a product is attempted to add to cart without selecting one of the radio buttons for size/color. Presently it appears to just change the color of the selection text to --ai-danger.
Is there a generally accepted method for enhancing this? Ideally something to make it clear to customers that they need to select an option, instead of simply changing the color to --ai-alert CSS value. Before we started working on adapting this, I figured we'd see what was recommended.
All around impressed with the code and performance.
We have begun to move products from Magento into Aimeos. One area we want to customize is the error message displayed when a product is attempted to add to cart without selecting one of the radio buttons for size/color. Presently it appears to just change the color of the selection text to --ai-danger.
Is there a generally accepted method for enhancing this? Ideally something to make it clear to customers that they need to select an option, instead of simply changing the color to --ai-alert CSS value. Before we started working on adapting this, I figured we'd see what was recommended.
All around impressed with the code and performance.
Re: Best method for adding selection error message?
Add the error messages where they should appear in the template and hide them by default by adding "display:none" in the CSS file for those messages. If one of the message (or several) should be shown, add a CSS class (which contains "display:block") to the messages by Javascript. You can the JS code to add/remove the CSS class for the error messages here:
https://github.com/aimeos/ai-client-htm ... #L272-L612
https://github.com/aimeos/ai-client-htm ... #L272-L612
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star