New column for product entity


Based on bundle plugin for sw6 I want to create a different logic and not using custom fields.


  1. Create a new column in product table

  2. use EntityExtensionInterface to a add a new Json Field

  3. Create a subscriber on product loaded and load data into product.extensions.newColumn

  4. Create in admin product edit a sw-entity-multi-select where I want for one product to assign more products in a json

  5. Load list of available product for selection, pre-populate assigned products, save select on each change

Most of the work is complete but I stopped when wanting to save the new column value via the admin api call.

For example:



    “yyy”: “xxxx”



“errors”: [


“code”: “0”,

“status”: “500”,

“title”: “Internal Server Error”,

“detail”: “Attempted to call an undefined method named “getReferenceDefinition” of class “Shopware\Core\Framework\DataAbstractionLayer\Field\StringField”.”




This neither is possible:



“newColumn”: {“xxx”:“yyy”}



Please advise if the above is possible .


We wanted to display the field separately from custom fields sets for an easier navigation/usage.

We can switch to many to many select with a new table for our parent / child products if not possible as we wanted into a simple json field.


Thank you,


1 Like