Create a Custom Shopping World Element with Custom Backend Ext JS Template Window

@davit_sargsyan schrieb:

  1. How to perform CRUD operations on my entries before passing them to DB, i.e. how to change one of the values with php ?

I guess you’re using the Shopware backend components. So your backend controller inherits from Shopware_Controllers_Backend_Application. So just have a look the the parent class. There’s a save/delete/getList/… function. So just do:

/* ... inside your backend controller ... */
public function save($data)
{
    // manipulate $data here
    return parent::save($data);
}
/*...*/

https://github.com/shopware/shopware/blob/5.4/engine/Shopware/Controllers/Backend/Application.php#L395 

@davit_sargsyan schrieb:

  1. How to create a multi-item selector in my shopping world element with my entries? Should I use the pushItemToElements method?

You need some further knowledge about ExtJS here. I know it’s difficult but I won’t help if you don’t learn it. You need to understand the MVC pattern of ExtJS. This doesn’t have to be related with Shopware. Just google for some tutorials (but remember that Shopware use’s ExtJS version 4.2.). If you understood the principle of models, stores and grids in ExtJS, it might be helpful to use the grid/search component from Shopware: https://github.com/shopware/shopware/blob/5.4/themes/Backend/ExtJs/backend/base/attribute/field/Shopware.form.field.Grid.js
As I said, you might not get a finalized working solution here. Wink
But of course we’re here to help you on your way there!

Best regards

2 „Gefällt mir“