PropertyAdd: Attributes missing for 'selection' products

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!
createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

PropertyAdd: Attributes missing for 'selection' products

Post by createanet » 21 Sep 2021, 13:13

Hello,

I know this plugin ships with the core and it has had some iterations.

Im finding that product attributes that belong to a selection product are not being attached to the orders product attributes.

Is this intentional?

Thanks

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

Re: PropertyAdd: Attributes missing for 'selection' products

Post by aimeos » 21 Sep 2021, 13:57

Attributes and properties are two different things.
An attribute for a selection article could be "color" and this would be attached to the ordered product. Product properties are not attached to ordered products but you can add the one you need using the PropertyAdd plugin.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Re: PropertyAdd: Attributes missing for 'selection' products

Post by createanet » 21 Sep 2021, 14:02

Sorry, it's probably my wording...

The PropertyAdd add plugin is working correctly for single articles and I understand the differences and how it works.

It fails when I need to use the properties from a variant on a selection product.

I have weights stored on the variants that I need to calculate shipping on an order.

Thanks,

createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Re: PropertyAdd: Attributes missing for 'selection' products

Post by createanet » 21 Sep 2021, 14:08

...Just to clarify. I have the plugin setup to store the following properties for a ordered product.

Code: Select all

propertyadd.types = ["package-weight","package-net-weight"]
These are being stored successfully for product types matching "article", but are missing for orders made for products with a type of "selection" - as they don't exist on the selection product, but on the chosen variant.

Im thinking I may be need follow the advice previously given on this thread here, and to query the product again.

Re: issues in Implementing Delivery Provider

But now I notice the order fails to contain any reference to the original variant and only the selection product. So it would seem I also need to look into storing this ID along with the order?

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

Re: PropertyAdd: Attributes missing for 'selection' products

Post by aimeos » 22 Sep 2021, 15:50

Variants of selection products are not handled by the PropertyAdd plugin yet. If you create a pull request that adds the product code of the variant articles here, we are happy to merge it:
https://github.com/aimeos/aimeos-core/b ... d.php#L192
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

createanet
Posts: 72
Joined: 22 Mar 2021, 16:56

Re: PropertyAdd: Attributes missing for 'selection' products

Post by createanet » 28 Sep 2021, 10:07

Thanks for the update on this. I've been on a little break and have just got around to looking at it today.

I have created a pull request with the suggested updates.

https://github.com/aimeos/aimeos-core/pull/252

For me, as I am still using 2020.10, I have created a new plugin which implements these changes.

Post Reply