What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
I have a question about potential limit of the spryker transfer objects. Let's say we sometimes have
I have a question about potential limit of the spryker transfer objects.
Let's say we sometimes have products with sizeOptions and sometimes with colorOptions (and sometimes with other options) depending on what is a super attribute in the product.
How to approach defining this in the transfer object if it pretty much relies on what was configured in the admin/database and not the code?
Comments
-
This sounds like a reason for multiple disparate types. If that is not possible, just create nullable fields in your DTOs and verify on the consuming side which one is which. But really, this should go into separate types if possible.
0 -
All proprties of Spryker transfers are nullable.
Also, it is supposed to use transfer objects without any limitation.
You are not required to fill in all the fields with values, you can use it as you wish: one property with value and all other nulls, or only few properties could have a value and all other nulls.0 -
but that means I have to add them to the code every time some admin adds/clicks it in the admin panel which is not what I'm doing daily. that's the main isue here - inconsistency
0 -
Is it possible ot add two property to you transfer? like
optionType="color|size|β¦"
andoptions=OptionTransfer[]
0 -
that won't work. sometimes product have both color and size as super attributes
0 -
so you cannot pick only one and add it to property
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 73 Spryker News
- 909 Developer Corner
- 769 Spryker Development
- 87 Spryker Dev Environment
- 361 Spryker Releases
- 3 Oryx frontend framework
- 34 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 69 Spryker Safari Questions
- 50 Random