问题标签 [shopware]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
2214 浏览

extjs - Shopware backend enhance category with ExtJs

I'm stuck in the development of an extension for Shopware. I want to extend the administration of categories in the correct way.

To achieve that created plugin (legacy). This plugins appends the first tab within a category.

This is done to add a fieldset with a dropdown. The file looks like this:

The main problem I suspect is the store. Leaving it like this I get an JS error Cannot read property 'load' of undefined. without the .load() there is no error, but I also can't determine if the store got loaded.

The store file itself is in Views/backend/haendlerbund_foobar_categories/store/foo_bar_products

and the content of the file is:

EDIT: For further context, this is the current state of the model the store references.

And the php controller which the store references as well has the following content:

It should return some dummy data for now.

I fail to solve the problem. As any documentation I was able to find was either focused on creating a separate component of changing an existing field. I suspect that I'm in the wrong scope or have a namespacing error or something.

Any help is greatly appreciated.

0 投票
2 回答
3008 浏览

php - Shopware 5.2.11 在我的插件中包含 JavaScript

我想在我的插件中添加一个 JavaScript 文件。我正在关注本教程,并且能够在我的安装(流浪者)中成功获得每日标语。

此外,我想加载一个 JavaScript 文件。我更改了 index.tpl 并添加了以下几行:

看一下生成的 html 的源代码,脚本标签就成功加载了。但是,我的 JavaScript 文件根本不会被加载。我必须将文件放在我的插件文件夹中的哪里?

目前我有这个结构

我正在使用商店软件 5.2.11。我不想添加内联脚本。我究竟做错了什么?

0 投票
2 回答
1017 浏览

php - Doctrine QueryBuilder 不返回 JOIN 和 WHERE IN 查询的所有行

我正在编写一个 Shopware 插件,并且我有以下代码来构建 SQL 查询:

根据以下内容,构建的 SQL 字符串如下$queryBuilder->getSql()

当我将 ":ids" 替换为 "1,2,3,4,5" 并执行查询时,所有行都按预期返回。(我确保 $relatedIds 也是“1,2,3,4,5”。)

当我在 PHP (via) 中执行查询时$queryBuilder->execute()->fetchAll(PDO::FETCH_GROUP|PDO::FETCH_ASSOC),只返回第一个 ID (1) 的结果。var_dump($result)显示以下内容:

为什么这不返回其他 ID (2,3,4,5) 的结果?

0 投票
1 回答
4478 浏览

php - 如何在自定义 Shopware 主题中包含来自自定义插件的模板?

我正在尝试在Shopware 5.2的自定义主题中包含来自自定义插件的模板。

主题模板包含以下行:

插件模板位于/custom/plugins/PLUGINNAME/Resources/views/frontend/custom/colorpicker.tpl

我收到以下错误消息:

致命错误:未捕获的 SmartyException:无法在 'frontend/detail/index.tpl|frontend/plugins/seo/index.tpl' 中加载模板片段 'frontend/custom/colorpicker.tpl' in...

我已经尝试将父级添加到文件路径中,但没有任何乐趣。错误消息消失,但未加载模板:

不幸的是,我在 Shopware 文档中找不到任何内容,说明是否有任何特殊需要从插件中包含模板。

0 投票
1 回答
301 浏览

extjs - ExtJS XTemplate 替换字符串中的特定出现

好的,所以我正在开发一个商店软件插件,我需要将disabled输入字段更改为readonly已在 XTemplate 中定义的字段。

我一直在试图找到一种方法来完成这项工作,但我根本想不出任何办法。

此代码是精简版,有多个输入字段,其中一些也被禁用,但这是最后一次出现。任何提示表示赞赏!:)

0 投票
1 回答
1676 浏览

shopware - 更改 Shopware 中的前端语言和多个国家/地区支持

所以,我试图了解这个电子商务解决方案是如何工作的。我已经安装了社区版并添加了默认商店。一切安好。我在 Shopware 文档中读到,您可以通过创建其他商店并将它们配置为语言商店来向网上商店添加多种语言。一切都很好,这很有效,我现在有两个网站。

问题是 - 即使本地化信息设置为罗马尼亚语 - 该网站全是德语。我真的需要购买 Shopware 商店中提供的语言包吗?或者我可以手动更改文本吗?如果是这样,你是怎么做到的?此外,显然所选语言的标志已关闭...我为 RO 配置了语言商店,但它将商店显示为 DE(德国)。

此外,在谈论产品库存、价格和付款方式时,Shopware 能否在所选语言之间产生差异?这个想法是,根据选择的国家/地区,产品库存和价格会发生变化。这样,产品代码可能会更改。此外,付款方式和帐户也必须更改。Shopware 可以做到这一点吗?如果是这样,是否有关于此的教程或其他内容?(我真的没有找到这样的东西......)

谢谢您的帮助 !


Shopware 社区论坛上交叉发布。

0 投票
0 回答
187 浏览

php - 与 Algolia 的客户特定价格

我正在为 Algolia 和 Shopware ( https://github.com/synonymous1984/SwAlgolia )开发一个开源插件。

我现在的问题是,我们的一位客户有以下场景:

  • 产品价格是根据不同的参数计算的,例如客户 ID、客户组、商品组、制造商等的组合。

因此,这意味着(理论上)每个客户都可以为每种产品拥有自己独特的价格。

由于不可能将所有价格预先计算到 Algolia 指数(或许多指数),因此我计划的方式是仅将产品数据发送到 Algolia,并在搜索结果从 Algolia 返回。

我对这个解决方案并不满意,但目前我还没有找到另一种方法。

也许你们中的某个人有更好的想法或其他想法如何解决这个问题?

在此先感谢,最好的,同义词

0 投票
1 回答
3963 浏览

.htaccess - 内部服务器错误 500 Shopware 5.2

将 Shopware 5.1 升级到 5.2.12 后,每次打开插件管理器时都会收到错误消息:

log) weitere Informationen finden Sie in der Datei error.log im Ordner logs bei Perl und anderen Scriptsprachen das Script hat zu viel CPU-Ressourcen verbraucht und wurde bedet das Script hat zu viel Memory-Ressourcen verbraucht und wurde bedet。In diesem Fall finden Sie eine Zeile �hnlich wie diese in Ihrem error.log "Unable to allocate X bytes" Script wurde nicht im ASCII Modus hochgeladen Script hat falsche Rechte (korrekt: 755) der Pfad zum Interpreter in der 1. Zeile ist nicht korrekt .htaccess Datei mit falschen Befehlen (mehr Informationen im error.log) weitere Informationen finden Sie in der Datei error.log im Ordner logs" log im Ordner logs bei Perl und anderen Scriptsprachen das Script hat zu viel CPU-Ressourcen verbraucht und wurde bedet das Script hat zu viel Memory-Ressourcen verbraucht und wurde bedet。In diesem Fall finden Sie eine Zeile �hnlich wie diese in Ihrem error.log "Unable to allocate X bytes" Script wurde nicht im ASCII Modus hochgeladen Script hat falsche Rechte (korrekt: 755) der Pfad zum Interpreter in der 1. Zeile ist nicht korrekt .htaccess Datei mit falschen Befehlen (mehr Informationen im error.log) weitere Informationen finden Sie in der Datei error.log im Ordner logs" log im Ordner logs bei Perl und anderen Scriptsprachen das Script hat zu viel CPU-Ressourcen verbraucht und wurde bedet das Script hat zu viel Memory-Ressourcen verbraucht und wurde bedet。In diesem Fall finden Sie eine Zeile �hnlich wie diese in Ihrem error.log "Unable to allocate X bytes" Script wurde nicht im ASCII Modus hochgeladen Script hat falsche Rechte (korrekt: 755) der Pfad zum Interpreter in der 1. Zeile ist nicht korrekt .htaccess Datei mit falschen Befehlen (mehr Informationen im error.log) weitere Informationen finden Sie in der Datei error.log im Ordner logs"

现在无法更新任何插件或查看任何已安装的插件。因此,除非插件未更新,否则无法进入生产模式。我该如何解决这个问题?

0 投票
1 回答
859 浏览

apache - 错误 503:商店软件更新后“客户端被服务器配置拒绝”

从 shopware5.1 更新到 shopware 5.2 后,我在每个页面上都收到错误消息“503 Service Unavailable”。查看它对我说的 error.log 文件:

“[2017 年 1 月 16 日星期一 12:37:55.555394] [access_compat:error] [pid 19443:tid 139770345473792] [client xyz] AH01797:客户端被服务器配置拒绝:/home/abc/www.xyz.com/anotherpath”。

但是,路径“anotherpath”不存在。我假设它来自文件夹 www.xyz.com 中的 htaccess。你有什么想法我能做什么吗?

0 投票
0 回答
226 浏览

zend-framework - SimpleSamlPhp:与 Shopware / Zend Framework 一起使用时缺少 ReturnTo 参数

我尝试编写一个 Shopware 插件,它针对 Facebook、LinkedIn 等不同平台提供 SSO。不幸的是,我在 2 天后就遇到了会话处理问题。

我在我的控制器操作中调用这 2 行:

当我执行此操作时,SimpleSamlAuth 中的会话出现了问题,因为在某些时候 ReturnTo 参数不再存在并且我会得到一个异常:

我认为问题在于使用 ZendFramework 的 Enlight a Fork 的商店软件系统。我认识到,当我在 ZendFramework Sessions 初始化之前将身份验证代码放入某个部分时,一切正常!

是否有最佳实践我应该如何配置 SimpleSamlPhp 的会话处理?