variant attributes for selection not displayed on FE

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!
MikaelNazarenko
Expert
Posts: 274
Joined: 27 Jun 2019, 16:19

Re: variant attributes for selection not displayed on FE

Post by MikaelNazarenko » 18 Jan 2022, 13:07

Here is how to extend the decorator:

Code: Select all

        'controller' => [
                'basket' => array(
                    'decorators' => array(
                        'local' => array( 'Category', 'Bundle', 'CustomSelect' ),
                    ),
                ),
            ]
        ],
The following things as for me are easy: create new object, extend it from default Select decorator..

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

Re: variant attributes for selection not displayed on FE

Post by aimeos » 19 Jan 2022, 12:48

MikaelNazarenko wrote: 18 Jan 2022, 10:47 From what I see here ext/ai-client-html/client/html/templates/common/partials/selection-standard.php variant attributes from selection product not used..
Yes, if you assign a variant attribute to the selection product itself instead of the variant articles of the section product, they are not used. It wouldn't make any sense because there's no choice for the variant attribute at the selection product.

If you want to add an attribute to the ordered product, you can assign a hidden attribute to the selection product instead. This will show up in the order for the shop owner but not for the customer in the basket.

An alternative would be to add the variant attriubte to all variant articles of the selection product instead of the selection product itself. Then, it will show up in the basket and the order but the customer has to click on the variant attribute in the detail view even if there's no choice for that attribute type.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply