Default variant selection

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!
BrianMecler
Posts: 41
Joined: 03 Jun 2023, 17:30

Default variant selection

Post by BrianMecler » 21 Mar 2024, 19:32

Laravel Framework v10.45.1, php8.1-fpm, aimeos/aimeos-laravel 2023.10.7

Hello,

I have a product that has 3 variants. When I look at the product page on the front end, I am able to click the dropdown and choose my variant.

Is it possible to configure the default variant that is selected when arriving at the product page? Currently there is no selection and I must choose.

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

Re: Default variant selection

Post by aimeos » 24 Mar 2024, 09:12

You could extend the JS code and add a new method to pre-select variant attributes of the first article after page load here:
https://github.com/aimeos/ai-client-htm ... -detail.js

If you can create a pull request, we would be happy to merge your change into the Aimeos core :-)
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply