How to extends the Propel function according to the standard
Hi Everyone
I want to show the custom attribute in the order item corner that look like this one
My idea is i will add more column in the table
spy_sales_order_item_metadata
example column: additional_attributes
I see the function that adding data to the table spy_sales_order_item_metadata
\Spryker\Zed\SalesProductConnector\Persistence\Propel\Mapper\SalesOrderItemMetadataMapper::mapItemTransferToSalesOrderItemMetadataEntity
So how to extends this function to save more data to the column additional_attributes ?
Comments
-
You can extend this mapper class on your Pyz namespace by creating the same class in the Persistence Layer and then extend the factory in the Persistence Layer. Then rewrite the createSalesOrderItemMetadataMapper() method in that factory to instantiate the mapper of the Pyz version of the 'SalesOrderItemMetadataMapper' class.
0 -
Thanks your supporting
I got your answer but is the above solution according Skyper's standard development ?
I'm thinking should I create new table to manage the additional attributes ?
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 65 Spryker News
- 879 Developer Corner
- 743 Spryker Development
- 84 Spryker Dev Environment
- 360 Spryker Releases
- 3 Oryx frontend framework
- 33 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 22 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
- 68 Spryker Safari Questions
- 50 Random