How to display default attributes in basket, checkout?

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!
columbo
Advanced
Posts: 125
Joined: 09 Oct 2019, 09:42

How to display default attributes in basket, checkout?

Post by columbo » 16 Jan 2024, 11:10

Hi,

we use default- and select- products for our catalog;
all (default and select) products have attributes like "selling unit"
  • for select products "selling unit" is stored as variant attribute
  • for default products it is stored as default attribute
attribute "selling unit" is displayed on the article detailpage for both (default and select) articles as desired - ok
But on basket, checkout and basket-history page only attribute for selection article are displayed - not for default article

How can we display default attributes "selling unit" also in the basket?
Already added 'default' in shop.php like:

Code: Select all

client/html/common/summary/detail/product/attribute/types => ['default', 'variant', 'config', 'custom' ]
but without success

Thank you

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

Re: How to display default attributes in basket, checkout?

Post by aimeos » 18 Jan 2024, 15:09

The easiest option is to add the attribute as "hidden" attribute (https://aimeos.org/docs/latest/manual/p ... cteristics). Hidden attributes are always added to the ordered products by default without and configuration but they are not displayed in the frontend.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

columbo
Advanced
Posts: 125
Joined: 09 Oct 2019, 09:42

Re: How to display default attributes in basket, checkout?

Post by columbo » 19 Jan 2024, 07:45

We would like to make the "selling unit" attribute visible in the basket (checkout, history) and in the payment mail.
Using the "hidden" attribute would be a bit misleading (but of course possible as a workaround).

Did I understand correctly, that the "default attribute" cannot be displayed in the basket, even if we add the "default" type in shop.php?

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

Re: How to display default attributes in basket, checkout?

Post by aimeos » 20 Jan 2024, 14:08

columbo wrote: 19 Jan 2024, 07:45 We would like to make the "selling unit" attribute visible in the basket (checkout, history) and in the payment mail.
Using the "hidden" attribute would be a bit misleading (but of course possible as a workaround).
Another option would be to create a basket plugin similar to the PropertyAdd plugin, just for a configured list of attributes:
https://github.com/aimeos/aimeos-core/b ... rtyAdd.php
columbo wrote: 19 Jan 2024, 07:45 Did I understand correctly, that the "default attribute" cannot be displayed in the basket, even if we add the "default" type in shop.php?
Yes, because the default attributes are not stored along with the ordered product. The mentioned configuration can only hide already available attributes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply