问题标签 [opencart2.3]

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 投票
1 回答
658 浏览

php - Opencart 通知:间接修改重载属性 ControllerCatalogProduct::$data

我知道它已经被问过很多次了,但是无论我在哪里寻找解决方案,在测试时我只看到失望。

请帮忙!

我正在对 opencart 2.x 版的核心产品控制器进行更改

我正在尝试在视图文件中呈现一个变量。但我无法访问它。每当我尝试使用以下方法执行此操作时,都会出现上述错误:

如果我这样做:

我根本无法访问视图文件中的 $view 变量。

请帮助解决这个问题。


更新

我在产品控制器的索引方法中分配值

0 投票
1 回答
574 浏览

email - 其他警报电子邮件不起作用

我想将通知(或警报)电子邮件发送到其他地址。这就是我所做的:

  1. /index.php?route=设置/设置
  2. 选项卡“电子邮件”
  3. 添加其他电子邮件(逗号分隔)

我发现了很多关于这个问题的话题。但解决方案始终是将协议从 SMTP 更改为 mail()。就我而言,这不是一个选择。有人知道如何将警报发送到多个地址吗?

谢谢你...

在此处输入图像描述

0 投票
2 回答
621 浏览

opencart - OpenCart 2.3.0.2 - 我的坏扩展去哪儿了?

我正在尝试在我的 OpenCart 2.3.02 中进行新的扩展,但我在代码中犯了一个错误。现在我的管理面板根本不会加载,只是一个白页 - 我无法以正常方式删除扩展。

该文件必须在服务器上的某个位置,但我找不到它。谁能告诉我他们去哪儿了?

0 投票
1 回答
317 浏览

opencart - 如何将扩展从 OpenCart 1.5 转换(重新编码)到 2.3

我曾经为 OpenCart 1.5 做了几个扩展,我想将它们“转换”为 OpenCart 2.3.0.2。

我很难弄清楚如何为 2.3.0.2 执行以下操作:

  • 如何将消息打印到页面?回声不会出现在任何地方。
  • 如何计算查询结果?当我尝试时,页面总是停止工作。

我已经尝试查看其他 2.3 扩展来解决这个问题,但我找不到任何类似的东西。我花了两天时间试图弄清楚这一点。

0 投票
1 回答
254 浏览

php - Opencart 网站上传到服务器时显示错误

当我从 localhost 上传到服务器时,我的 opencart 网站显示错误。这是错误:

警告:require_once(C:/xampp/htdocs/shopperscart/system/startup.php):无法打开流:第17行的/home/myslimki/public_html/index.php中没有这样的文件或目录

致命错误:require_once():打开失败需要'C:/xampp/htdocs/shopperscart/system/startup.php' (include_path='.:/opt/cpanel/ea-php56/root/usr/share/pear')在第 17 行的 /home/myslimki/public_html/index.php 和

我不知道该怎么办。有人可以帮我解决,因为我对 PHP 还很陌生?

0 投票
2 回答
5476 浏览

php - fclose() 期望参数 1 是在 opencart library/log.php opencart 中给出的资源布尔值

我已经安装了 opencart2.3,它在我的本地主机上运行良好。现在我已经将它上传到亚马逊 AWS 服务器上,它给了我以下错误

在此处输入图像描述

当我进行修改并进行刷新时,显示如下:

警告:取消链接(/var/www/html/system/storage/modification/system/library/template/tiwg.php):第 101 行的 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝警告:取消链接(/var/www/html/system/storage/modification/system/library/template/php.php):/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 101 行警告: rmdir(/var/www/html/system/storage/modification/system/library/template):/var/www/html/diveandfeelalive/controller/extension/modification.php 105 行中的权限被拒绝警告:取消链接(/var/ www/html/system/storage/modification/system/library/language.php):/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 101 行警告:取消链接(/var/www/html /system/storage/modification/system/library/config.php):第 101 行 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝警告:取消链接(/var/www/html/system/storage/modification/system/library/cart/cart.php):权限在第 101 行的 /var/www/html/diveandfeelalive/controller/extension/modification.php 中被拒绝警告:rmdir(/var/www/html/system/storage/modification/system/library/cart): Permission denied in /var/ www/html/diveandfeelalive/controller/extension/modification.php 第 105 行警告:rmdir(/var/www/html/system/storage/modification/system/library): Permission denied in /var/www/html/diveandfeelalive/controller /extension/modification.php on line 105Warning: unlink(/var/www/html/system/storage/modification/system/engine/loader.php): Permission denied in /var/www/html/diveandfeelalive/controller/extension/第 101 行的 modify.php 警告:取消链接(/var/www/html/system/storage/modification/system/engine/action.php):/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 101 行警告:rmdir(/ var/www/html/system/storage/modification/system/engine):权限在 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的第 105 行被拒绝警告:rmdir(/var/www/html/system /storage/modification/system): 第 105 行 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的目录不为空警告: unlink(/var/www/html/system/storage/modification/admin/language /en-gb/common/column_left.php):/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 101 行警告:rmdir(/var/www/html/system/storage/modification/管理员/语言/en-gb/common):第 105 行 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝警告:rmdir(/var/www/html/system/storage/modification/admin/language/en-gb):权限被拒绝/var/www/html/diveandfeelalive/controller/extension/modification.php 第 105 行警告:rmdir(/var/www/html/system/storage/modification/admin/language): Permission denied in /var/www/html/ 105 行的diveandfeelalive/controller/extension/modification.php 警告:取消链接(/var/www/html/system/storage/modification/admin/controller/extension/installer.php):/var/www/html/diveandfeelalive 中的权限被拒绝/controller/extension/modification.php 第 101 行/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 105 行警告:rmdir(/var/www/html/system/storage/modification/admin/language):/var/www 中的权限被拒绝/html/diveandfeelalive/controller/extension/modification.php 第 105 行警告:取消链接(/var/www/html/system/storage/modification/admin/controller/extension/installer.php):/var/www/ 中的权限被拒绝第 101 行的 html/diveandfeelalive/controller/extension/modification.php/var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝,第 105 行警告:rmdir(/var/www/html/system/storage/modification/admin/language):/var/www 中的权限被拒绝/html/diveandfeelalive/controller/extension/modification.php 第 105 行警告:取消链接(/var/www/html/system/storage/modification/admin/controller/extension/installer.php):/var/www/ 中的权限被拒绝第 101 行的 html/diveandfeelalive/controller/extension/modification.php第 101 行 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝第 101 行 /var/www/html/diveandfeelalive/controller/extension/modification.php 中的权限被拒绝

我已经为用户/组设置了 WRITABLE 权限。但它仍然显示相同的错误,当我去system->setting->server我发现保存按钮被禁用。

我很困惑为什么会这样。我做了很多研发,但没有找到解决方案。

请帮忙

提前致谢。

0 投票
1 回答
511 浏览

javascript - 在 OpenCart 上自动隐藏警报消息

我正在尝试在OpenCart 版本 2.3.0.2中自动隐藏 ajax 警报消息,但我无法使其正常工作。我在模板的头文件中添加了下面的代码,这样我就可以.alert在 5 秒后隐藏 div:

它工作正常,但仅适用于触发的第一个警报,我必须重新加载/刷新页面才能使隐藏脚本再次工作!

我究竟做错了什么?

0 投票
3 回答
676 浏览

php - 从 OpenCart 按类别检索产品

如何编写 PHP 片段来读取 OpenCart 数据库以按类别提取产品并将其显示在 OpenCart 框架之外?例如,我为小部件 A 和 B 构建了一个不错的前端网站,然后有一个名为 /cart 的子目录,其中安装了 OpenCart,在我的前端网站中,我加载了某种 OpenCart 库文件,然后读取数据库以获取产品按类别(A 和 B)。或者,也许您知道直接 SQL 本身的技术?

这个问题与这个问题不同,因为我试图不在 OpenCart 中构建新模板,而是使用 API(或直接访问数据库)在 OpenCart 的应用程序框架之外和我自己的应用程序框架中显示产品。

0 投票
2 回答
1108 浏览

php - OpenCart 错误 500 仅适用于 index.php

我一直在尝试将 OpenCart 2.3.0.2 从 Plesk 手动迁移到 cPanel,到目前为止它工作正常。我已经将所有文件上传到文件管理器的根目录并设置了两个config.php文件,第一个在根目录下,第二个在admin目录下。

现在问题来了。每当我尝试加载页面(example.com)时,都会收到错误 500。但是,当我尝试访问该example.com/admin页面时,该页面已成功加载。我已经设法在那里登录了六次。我还创建了一个info.php文件,其中包含phpinfo();后一个文件并将其放在根目录中。所以然后我尝试访问example.com/info.php并且也加载了该文件。但是让 example.com 工作总是返回错误 500。我什至尝试重新上传和替换 index.php 文件,但无济于事。

请注意,我已经两次和三次检查了config.phpadmin/config.php文件中的输入错误,我非常有信心没有任何错误。

有什么想法我接下来应该尝试什么?

0 投票
1 回答
2637 浏览

php - 检查用户是否登录到 OpenCart 2.3.X

我正在使用最新版本的 OpenCart “2.3.0.2”,并且我想在主页上只为未登录的用户显示特定的 div。我要编辑的文件是:catalog/view/theme/default/template/common/home.tpl

我已经尝试过的代码是:

但是,此代码不起作用,因为我收到此错误消息:

注意:未定义变量:在第 3 行登录 \catalog\view\theme\default\template\common\home.tpl

奇怪的是,当我在其他文件(例如 header.tpl)上使用上面的代码时,一切正常。谁能指出我正确的方向,因为我是 MVC 结构的新手?