0

I have a Table in a custom plugin. I would like to select a row and update the values of selected row using Edit button. There is only one Edit button on the top right corner of the plugin.

1

Try to find out what values you are getting back when you click Edit in your block. I think you will get following:

  • your page entity id,
  • view name
  • Selected Item Id.

With this information you can get the entity from Commerce engine database using find entity pipeline, you must be storing your data in some component so you can get that component from entity and find the row by Item Id.

Then create another view that will allow content authors to edit the values (this is similar to add but for Edit this time) Then you need to add an action for update (you must be having a similar action on add)
Do following in edit action:

  • get your posted values
  • get your entity from commerce database
  • update properties/components in your entity
  • persist entity in commerce database.
  • it worked. Thanks. – Kanchan Aug 12 at 11:39
  • great thanks for update. – Vipin Banka Aug 12 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.