简体   繁体   English

Shopware v5:如何创建自定义小部件?

[英]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. 缺乏英文文档是非德语开发人员在处理Shopware开发时面临的主要障碍之一。

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. 我一直在寻找有关如何创建窗口小部件,将其集成到插件上并允许管理员将其包含在任何产品页面上的文档。但是,除了这个无法正常工作的示例,我找不到任何曲目: http://community.shopware的.com / Eigene-Einkaufswelten-菁元素-erstellen_detail_1459.html所提供的示例插件: Vimeo Widget Example Plugin 不起作用上Shopware V5。

Is it even possible withing Shopware "ecosystem" to offer this customized widgets for admins; 甚至有可能通过Shopware“生态系统”为管理员提供这种定制的小部件; 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. 在Magento中,可以创建这样的窗口小部件,管理员可以轻松地选择他们希望窗口小部件出现在主题的哪个部分(自定义或默认主题)。

In Prestashop they offer some kind of hooks, the same for WordPress.. What about Shopware? 在Prestashop中,它们提供了与WordPress相同的某种挂钩。

"Einkaufswelten" are called "Shopping Worlds" in Shopware and there is an english tutorial right here: “ Einkaufswelten”在Shopware中被称为“购物世界”,这里有一个英语教程:

http://community.shopware.com/Experienced-creating-Shopping-World-elements_detail_1668.html 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. 它适用于4.2及更高版本,并且也应与5.x一起使用。 I've created my widget with help of that tutorial for Shopware 5. 我已经在该Shopware 5教程的帮助下创建了我的小部件。

You may take a look here: 您可以在这里看看:

https://developers.shopware.com/designers-guide/configuration-using-theme-php/ 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? 在Shopware中,您可以创建自定义主题选项-这是您要搜索的内容吗?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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