shopware / shopware

Shopware 6 is an open commerce platform based on Symfony Framework and Vue and supported by a worldwide community and more than 1.500 community extensions
https://shopware.com
MIT License
2.81k stars 1.02k forks source link

Access custom fields through data mappings? #1703

Open gRoberts84 opened 3 years ago

gRoberts84 commented 3 years ago

Description

I have created a custom field for the Category entity and I want to pull that through via Data Mappings on my Category listing layout.

{{ category.customFields.field }} fails with Call to a member function get() on array within the AbstractCmsElementResolver::resolveEntityValue function.

The data is available in the entity, however as the element resolver is not able to handle arrays, it fails.

Possible Solution

I had a play around with Symfony\Component\PropertyAccess\PropertyAccess, which allows me to access it, however I imagine there is a lot more behind the current resolver that this would not cover.

Additional context

kinglouie commented 6 months ago

@gRoberts84 did you find any solution to make custom fields available in the data mapping dropdown?

MarcelSchmaeing commented 2 months ago

Hi,

thx for your issue we will put it into our new evaluation process and have a look at it again.

shopwareBot commented 2 months ago

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-37965.

[created from NEXT-37965, comment 489041]