Store data on a line items custom field and show this in the administration

Hello!

I’m currently creating an app for Shopware by using the new App extension mechanism.

What I’m trying to achieve is the following:

  • In the storefront on the product page we have an input field (this i have already achieved)
  • The value of that input field should be stored on the line item when the user clicks add to cart
  • That value should also be viewable on the cart page
  • That value should be viewable in the administration

I’m not sure this is even possible by using an app, does someone have a suggestion?

Thanks a lot.

Best regards,

Roel

Thanks, how can I show this data in the administration next to the line item?

I don’t think there’s currently a built-in way to display custom line item data directly in the administration order line items view.

If you need it to appear there, you’ll most likely have to extend the Administration with a custom plugin that adds your field to the order line item component.

I’d also be interested if there’s a native solution for this, but I haven’t found one so far.