Calling Developers!
We are reenergizing our code contribution process! Learn More

How to extends the Propel function according to the standard

Options
harry
harry Developer Posts: 9 🧑🏻‍🚀 - Cadet

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 ?

Tagged:

Comments

  • vparannattilcherul
    vparannattilcherul Posts: 16 🧑🏻‍🚀 - Cadet
    Options

    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.

  • harry
    harry Developer Posts: 9 🧑🏻‍🚀 - Cadet
    Options

    Hi @vparannattilcherul

    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 ?