shopware-pwa icon indicating copy to clipboard operation
shopware-pwa copied to clipboard

[FEATURE] productObject to include most properties listed in the interface

Open BeeJayJayn opened this issue 3 years ago • 3 comments

Description

Currently the product object lacks a severe amount of data that is provided but has to be accessed manually by changing the params and other properties are just not accessible at all.

I recommend to add:

  • tags
  • extensions

I would prefer to see the whole interface to be available if requested via the api.

Acceptance criteria

  • [ ] the product object returns a proper "tags" array
  • [ ] the product object returns a proper "extensions" array
  • [ ] clear documentation on how to get request them in case they aren't included by default

BeeJayJayn avatar Jul 12 '21 14:07 BeeJayJayn

hi @BeeJayJayn, I have found that extensions is being ignored during serialization process. the extensions property is just unset in entire entity that's because the condition, and that happens only when the includes filtering is turned on. I believe as same as tags property but I can be wrong about that.

If you want to get the whole product interface you need to disable includes for product entity. then you will have every field, even extensions.

btw. I think it's a perfect candidate for an issue to be reported in official Shopware 6 github to clearify reasons why is that. I'm also curious 👍🏻

mkucmus avatar Jul 28 '21 12:07 mkucmus

@mkucmus What do you mean by disabling includes for the product entity? How would one achieve that?

BeeJayJayn avatar Aug 05 '21 10:08 BeeJayJayn

@mkucmus What do you mean by disabling includes for the product entity? How would one achieve that?

I'm almost sure that's the Shopware 6 core issue and should be handled right there. I reported an issue and looking forward for some news.

mkucmus avatar Aug 05 '21 11:08 mkucmus