简体   繁体   中英

Shopware v5: how to create custom widgets?

The lack of English documentation is one of the major obstacles non German speaking developers face when dealing with Shopware development.

I was searching for documentation on how to create a widget, integrate it on my plugin and allow admins to include it on any product pages.. However i couldn't find any track except this non working example: http://community.shopware.com/Eigene-Einkaufswelten-Elemente-erstellen_detail_1459.html The provided example plugin: Vimeo Widget Example Plugin doesn't work on Shopware v5.

Is it even possible withing Shopware "ecosystem" to offer this customized widgets for admins; where they can choose in which part of their theme they want the widget to show? Or must they hard code the snippet that calls the widget inside their theme templates?

In Magento it is possible to create such widgets and admins can easily choose in which part of their theme (custom or default themes) they want the widget to appear.

In Prestashop they offer some kind of hooks, the same for WordPress.. What about Shopware?

"Einkaufswelten" are called "Shopping Worlds" in Shopware and there is an english tutorial right here:

http://community.shopware.com/Experienced-creating-Shopping-World-elements_detail_1668.html

It's for version 4.2 and above and should also work with 5.x. I've created my widget with help of that tutorial for Shopware 5.

You may take a look here:

https://developers.shopware.com/designers-guide/configuration-using-theme-php/

In Shopware you can create custom Theme Options - Is this what you are searching for?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM