问题标签 [prestashop-1.7]

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 回答
1675 浏览

product - Prestashop 1.7.0.2 服务器在尝试上传产品图片时响应 500 代码

当我尝试上传产品图片时,我得到服务器响应 500 代码。我最初在我的本地主机上安装了 prestashop 1.7.0.2,后来搬到了在线。但之后我无法上传图片。它在我的 xampp 服务器本地主机上工作正常。:请帮忙

0 投票
2 回答
1791 浏览

php - 在 Prestashop 顶部菜单中按字母顺序排序类别

我已经为一个客户建立了一个 Prestashop 1.7 网站,我每天都在用脚本导入他的新产品。如果这些产品尚不存在,则将它们放入我创建的类别中。我的问题是新创建的类别放在下拉顶部菜单的末尾,按字母顺序显示会更好。我知道我可以在后台通过将它们拖放到适当的位置来做到这一点,但我希望我的脚本能够自动完成。

我已经覆盖了Category.php该类以进行其他更改,因此我可以编辑此文件。我试图将ORDER BY我找到的每个子句从depth或更改positionname。它有一些效果,因为类别确实是按名称排序的,但其中很多只是从菜单中消失了(例如,在按位置排序的 10 个类别中,只有 4 个仍然按名称排序)。

你知道实现这一目标的方法吗?

0 投票
4 回答
2384 浏览

apache - Prestashop 1.7 安装 Ubuntu 14.04 LAMP 重定向太多

我正在尝试在 Digitalocean 的 Ubuntu 14.04 LAMP 液滴上安装 Prestashop 1.7。

presta在中的文件夹下复制 Prestashop 源文件后/var/www/html,在浏览器中访问http://95.85.6.69/presta/时,我被重定向到http://95.85.6.69/presta/install/index.php?step=welcome这很酷,但它一直在重定向,直到我得到:ERR_TOO_MANY_REDIRECTS退回给我。

难道我做错了什么?有没有我缺少的配置?我怎样才能超越这个错误?

chrome 开发工具 -> 网络

上图是对错误描述的补充。

PS:忽略 IP 的差异,因为它们是在 Digitalocean 上多次部署同一快照 ubuntu 14.04 LAMP 的结果。

0 投票
1 回答
7933 浏览

prestashop - 通过 Prestashop 1.7 网络服务创建新产品

我正在尝试通过 Prestashop 1.7 网络服务创建新产品。

我将以下 XML 发布到https://www.myshop.com/api/products。(我从https://www.myshop.com/api/products?schema=blank的空白方案创建了 XML 数据)

但我收到以下错误:

正如您在发布的 XML 中所见,价格字段有一个值。此外,上面 XML 中包含的值对于 Prestashop 1.6 来说已经足够了。

我究竟做错了什么?

0 投票
2 回答
8021 浏览

php - Prestashop 1.7 创建管理模块

嗨,我是 prestashop 的新手,我尝试为 1.7 创建一个管理模块。我会创建一个新菜单来显示模板并管理我的数据库。

模块/mymodule/mymodule.php:

模块/mymodule/controller/admin/MyModuleController.php:

模块/mymodule/views/templates/admin/mymodule.tpl:

我通过编译大量教程 1.7 / 1.6 创建了它,但安装失败。Prestashop 为我们提供了一个文档来创建第一个模块,但它并没有真正记录在案,我在互联网上没有发现任何真正有用的 1.7。

有什么帮助/建议吗?

谢谢

EDIT1:好的,安装正确,我的选项卡已创建,但是当我单击它时,它会调用“controller = MyModule”并且找不到模块控制器。就快结束了。

0 投票
1 回答
167 浏览

prestashop - 当提交下订单按钮到订单页面时,会生成此消息

当提交下订单按钮到订单页面时,会生成此消息。如何解决此错误。请帮助任何人。

订单对象 ( [id_address_delivery] => 88641 [id_address_invoice] => 88641 [id_shop_group] => 5 [id_shop] => 1 [id_cart] => 31973 [id_currency] => 1 [id_lang] => 1 [id_customer] => 27026 [id_carrier] => 73 [current_state] => [secure_key] => 353b960ec14efca0bf8145f79908794a [payment] => Authorize.net AIM(高级集成方法)[module] => authorizeaim [conversion_rate] => 1.000000 [recyclable] => 0 [gift] => 0 [gift_message] => [mobile_theme] => 0 [shipping_number] => [total_discounts] => 0 [total_discounts_tax_incl] => 0 [total_discounts_tax_excl] => 0 [total_paid] => 6.5 [total_paid_tax_incl] = > 6.5 [total_paid_tax_excl] => 6.5 [total_paid_real] => 0 [total_products] => 6.5 [total_products_wt] => 6.5 [total_shipping] => 0 [total_shipping_tax_incl] =>0 [total_shipping_tax_excl] => 0 [carrier_tax_rate] => 0 [hazmat_fees] => 0 [poison_fees] => 0 [refrigerated_fees] => 0 [ponumber] => [total_wrapping] => 0 [total_wrapping_tax_incl] => 0 [total_wrapping_tax_excl ] => 0 [invoice_number] => [delivery_number] => [invoice_date] => 0000-00-00 00:00:00 [delivery_date] => 0000-00-00 00:00:00 [有效] => [ date_add] => [date_upd] => [reference] => JYADOFQPY [webserviceParameters:protected] => Array ( [objectMethods] => Array ( [add] => addWs ) [objectNodeName] => order [objectsNodeName] => orders [字段] => 数组([id_address_delivery] => 数组([xlink_resource] => 地址)[id_address_invoice] => 数组([xlink_resource] => 地址)[id_cart] => 数组([xlink_resource] => 购物车)[ id_currency] =>数组 ( [xlink_resource] => 货币 ) [id_lang] => 数组 ( [xlink_resource] => 语言 ) [id_customer] => 数组 ( [xlink_resource] => 客户 ) [id_carrier] => 数组 ( [xlink_resource] => 运营商) [current_state] => Array ( [xlink_resource] => order_states ) [module] => Array ( [required] => 1 ) [invoice_number] => Array ( ) [invoice_date] => Array ( ) [delivery_number] => Array ( ) [delivery_date] => Array ( ) [valid] => Array ( ) [date_add] => Array ( ) [date_upd] => Array ( ) ) [associations] => Array ( [order_rows] => Array ( [resource] => order_row [setter] => [virtual_entity] => 1 [fields] => Array ([id] => Array () [product_id] => Array ([required] => 1) [product_attribute_id] = > 数组([必需] => 1)[product_quantity] =>数组 ( [required] => 1 ) [product_name] => 数组 ( [setter] => ) [product_price] => 数组 ( [setter] => ) [unit_price_tax_incl] => 数组 ( [setter] => ) [unit_price_tax_excl ] => 数组 ( [setter] => ) ) ) ) ) [_taxCalculationMethod:protected] => 1 [id] => [id_shop_list] => [get_shop_from_context:protected] => 1 [table:protected] => 订单 [ identifier:protected] => id_order [fieldsRequired:protected] => Array ([0] => id_address_delivery [1] => id_address_invoice [2] => id_cart [3] => id_currency [4] => id_lang [5] = > id_customer [6] => id_carrier [7] => payment [8] => module [9] => total_paid [10] => total_paid_real [11] => total_products [12] => total_products_wt [13] => conversion_rate ) [fieldsSize:protected] => 数组 () [fieldsValidate:protected] => 数组 ( [id_address_delivery] => isUnsignedId [id_address_invoice] => isUnsignedId [id_cart] => isUnsignedId [id_currency] => isUnsignedId [id_shop_group] => isUnsignedId [id_shop] => isUnsignedId [id_lang] => isUnsignedId [id_customer ] => isUnsignedId [id_carrier] => isUnsignedId [current_state] => isUnsignedId [secure_key] => isMd5 [payment] => isGenericName [module] => isModuleName [recyclable] => isBool [gift] => isBool [gift_message] = > isMessage [mobile_theme] => isBool [total_discounts] => isPrice [total_discounts_tax_incl] => isPrice [total_discounts_tax_excl] => isPrice [total_paid] => isPrice [total_paid_tax_incl] => isPrice [total_paid_tax_excl] => isPrice [total_paid_real] => isPrice [total_products] => isPrice [total_products_wt] =>isPrice [total_shipping] => isPrice [total_shipping_tax_incl] => isPrice [total_shipping_tax_excl] => isPrice [carrier_tax_rate] => isFloat [hazmat_fees] => isPrice [poison_fees] => isPrice [refrigerated_fees] => isPrice [total_wrapping] => isPrice [ total_wrapping_tax_incl] => isPrice [total_wrapping_tax_excl] => isPrice [shipping_number] => isTrackingNumber [conversion_rate] => isFloat [date_add] => isDate [date_upd] => isDate) [fieldsRequiredLang:protected] => Array () [fieldsSizeLang:protected ] => Array () [fieldsValidateLang:protected] => Array () [tables:protected] => Array () [image_dir:protected] => [image_format:protected] => jpg [def:protected] => Array ( [table] => orders [primary] => id_order [fields] => Array ( [id_address_delivery] => Array ( [type] =>1 [validate] => isUnsignedId [required] => 1) [id_address_invoice] => Array ([type] => 1 [validate] => isUnsignedId [required] => 1) [id_cart] => Array ([type] => 1 [验证] => isUnsignedId [必需] => 1 ) [id_currency] => 数组 ( [类型] => 1 [验证] => isUnsignedId [必需] => 1 ) [id_shop_group] => 数组 ( [ type] => 1 [validate] => isUnsignedId ) [id_shop] => Array ( [type] => 1 [validate] => isUnsignedId ) [id_lang] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_customer] => Array ( [type] => 1 [validate] => isUnsignedId [required] => 1 ) [id_carrier] => Array ( [type] => 1 [validate] => isUnsignedId [必需] => 1 ) [current_state] => 数组 ( [type] => 1 [validate] => isUnsignedId ) [secure_key] =>Array ( [type] => 3 [validate] => isMd5 ) [payment] => Array ( [type] => 3 [validate] => isGenericName [required] => 1 ) [module] => Array ( [type ] => 3 [validate] => isModuleName [required] => 1) [recyclable] => Array ([type] => 2 [validate] => isBool) [gi​​ft] => Array ([type] => 2 [validate] => isBool ) [gi​​ft_message] => Array ( [type] => 3 [validate] => isMessage ) [mobile_theme] => Array ( [type] => 2 [validate] => isBool ) [total_discounts] => 数组 ( [type] => 4 [validate] => isPrice ) [total_discounts_tax_incl] => 数组 ( [type] => 4 [validate] => isPrice ) [total_discounts_tax_excl] => 数组 ( [type] => 4 [validate] => isPrice ) [total_paid] => 数组 ( [type] => 4 [validate] => isPrice [required] => 1 ) [total_paid_tax_incl] =>Array ( [type] => 4 [validate] => isPrice ) [total_paid_tax_excl] => Array ( [type] => 4 [validate] => isPrice ) [total_paid_real] => Array ( [type] => 4 [validate ] => isPrice [required] => 1) [total_products] => Array ([type] => 4 [validate] => isPrice [required] => 1) [total_products_wt] => Array ([type] => 4 [validate] => isPrice [required] => 1 ) [total_shipping] => 数组 ( [type] => 4 [validate] => isPrice ) [total_shipping_tax_incl] => 数组 ( [type] => 4 [validate] = > isPrice ) [total_shipping_tax_excl] => Array ( [type] => 4 [validate] => isPrice ) [carrier_tax_rate] => Array ( [type] => 4 [validate] => isFloat ) [hazmat_fees] => Array ( [type] => 4 [validate] => isPrice ) [poison_fees] => 数组 ( [type] => 4 [validate] =>isPrice ) [refrigerated_fees] => Array ( [type] => 4 [validate] => isPrice ) [ponumber] => Array ( [type] => 3 ) [total_wrapping] => Array ( [type] => 4 [ validate] => isPrice ) [total_wrapping_tax_incl] => Array ( [type] => 4 [validate] => isPrice ) [total_wrapping_tax_excl] => Array ( [type] => 4 [validate] => isPrice ) [shipping_number] = > Array ( [type] => 3 [validate] => isTrackingNumber ) [conversion_rate] => Array ( [type] => 4 [validate] => isFloat [required] => 1 ) [invoice_number] => Array ( [ type] => 1 ) [delivery_number] => Array ( [type] => 1 ) [invoice_date] => Array ( [type] => 5 ) [delivery_date] => Array ( [type] => 5 ) [有效] => 数组 ( [type] => 2 ) [reference] => 数组 ( [type] => 3 ) [date_add] => 数组 ( [type] =>5 [validate] => isDate ) [date_upd] => Array ( [type] => 5 [validate] => isDate ) ) [classname] => Order ) [update_fields:protected] => [product_list] => Array ( [0] => 数组([hazmat_fees] => 0 [poison_pack] => 0 [refrigerated_fees] => 0 [drop_shipping] => 0 [id_product_attribute] => 0 [id_product] => 21930 [cart_quantity] => 1 [ id_shop] => 1 [name] => 热/冷防护手套,17" 长度 [is_virtual] => 0 [description_short] => • 适用于极热或极冷的应用 • 棉质涂有镀铝有机硅 • 可承受 450°F 的短整数0 [refrigerated_fees] => 0 [drop_shipping] => 0 [id_product_attribute] => 0 [id_product] => 21930 [cart_quantity] => 1 [id_shop] => 1 [name] => 热/冷防护手套,17"长度 [is_virtual] => 0 [description_short] => • 适用于极热或极冷的应用 • 涂有镀铝有机硅的棉布 • 可承受 450°F 的短 int0 [refrigerated_fees] => 0 [drop_shipping] => 0 [id_product_attribute] => 0 [id_product] => 21930 [cart_quantity] => 1 [id_shop] => 1 [name] => 热/冷防护手套,17"长度 [is_virtual] => 0 [description_short] => • 适用于极热或极冷的应用 • 涂有镀铝有机硅的棉布 • 可承受 450°F 的短 int

[available_now] => [available_later] => [id_category_default] => 1181 [id_supplier] => 0 [id_manufacturer] => 0 [on_sale] => 0 [ecotax] => 0.000000 [additional_shipping_cost] => 0.00 [available_for_order] = > 1 [价格] => 6.5 [有效] => 1 [单位] => [unit_price_ratio] => 0.000000 [quantity_available] => 106 [width] => 8.000000 [height] => 8.000000 [depth] => 8.000000 [ out_of_stock] => 2 [重量] => 1.000000 [date_add] => 0000-00-00 00:00:00 [date_upd] => 2016-09-01 08:00:39 [数量] => 1 [link_rewrite] => HOTCOLD-PROTECTIVE-MITT-17-LENGTH [类别] => 化学和热手套 [unique_id] => 0000021930000000000088641 [id_address_delivery] => 88641 [wholesale_price] => 4.214648 [advanced_stock_management] => 0 [supplier_reference] => [id_customization] =>[customization_quantity] => [reference] => 180-50591 [ean13] => [upc] => [minimal_quantity] => 1 [stock_quantity] => 106 [price_wt] => 6.5 [total_wt] => 6.5 [total] => 6.5 [id_image] => 21930-71813 [legend] => [reduction_applies] => [quantity_discount_applies] => [allow_oosp] => 1 [features] => Array () [rate] => 0 [tax_name] = > [warehouse_list] => 数组 ( [0] => ) [in_stock] => 1 [carrier_list] => 数组 ( [0] => 73 ) ) )0 [tax_name] => [warehouse_list] => 数组 ( [0] => ) [in_stock] => 1 [carrier_list] => 数组 ( [0] => 73 ) ) ) )0 [tax_name] => [warehouse_list] => 数组 ( [0] => ) [in_stock] => 1 [carrier_list] => 数组 ( [0] => 73 ) ) ) )

0 投票
1 回答
119 浏览

php - Prestashop 模块关闭

到目前为止,我正在为 prestashop 创建我的第一个博客,我正在做我想做的事,所以我遇到了一个我无法解决的问题:

该模块需要一个api密钥才能工作,问题是如果这个api密钥不存在我可以发出警告,我不能做的是断开模块,所以我用它来理解缺少了什么。

如果没有变量,我想关闭模块。这样在钩子之后他就不会执行代码。

0 投票
1 回答
2428 浏览

overriding - 覆盖在 prestashop 1.7 类别类上不起作用

为什么 prestashop 不将我的修改保存到数据库中?我已经对 Category.php (prestashop 1.7) 类文件进行了覆盖,这是我的代码:

/覆盖/类/Category.php

class Category extends CategoryCore { /** * afficher/masquer les produits */ public $show_products = 1; 公共$andana;

}

/覆盖\控制器\管理员\AdminCategoriesController.php

类 AdminCategoriesController 扩展 AdminCategoriesControllerCore {

}

PS:我在 ps_category 表中添加了“show_products”,在 ps_category_lang 表中添加了“andana”

请帮我 :(

0 投票
0 回答
2433 浏览

php - 错误 500 Prestashop 1.7

我创建了一个脚本,它获取产品、类别和制造商的数据,并将它们自动插入数据库 prestashop。在 prestashop 脚本 1.6 版中运行良好,但在新版本 (1.7) 中数据插入正常,但是当我从后台编辑产品时出现错误 500。我尝试启用调试版本以了解问题,但始终没有错误 500。经过几次测试,我意识到问题源于类别,因为如果我将类删除到表“类别”产品修改工作,但我不能找出哪些数据存在这个问题,我怎样才能准确地找到错误?

对不起我的英语,我是意大利人。

编辑: 我设法启用了错误,现在显示了这三个错误:

致命错误:第 154 行 /var/www/vhosts/passiontech.it/httpdocs/classes/db/DbPDO.php 中允许的内存大小为 1048576000 字节已用尽(尝试分配 20480 字节)

致命错误:在 /var/www/vhosts/passiontech.it/httpdocs/vendor/symfony/symfo‌​ny/src/Symfony/Compo‌​nent/Debug/Exception 中允许的内存大小为 1048576000 字节已用尽(尝试分配 32768 字节) ​/OutOfMemoryExceptio‌​n.php 在第 1 行

致命错误:第 0 行的 Unknown 中允许的内存大小为 1048576000 字节已用尽(尝试分配 147456 字节)

EDIT2:我试图消除所有产品,但这样做后问题仍然存在,我无法添加产品,为此我必须删除类别,然后问题出在类别上,那么我的问题是:什么,在类别中,会导致 500 错误吗?

0 投票
1 回答
1310 浏览

admin - 如何在 prestashop 1.7 中添加产品标签

对于这个小问题,我很抱歉,但我可以在哪里将标签添加到产品中。Prestashop 1.7 软件。在他们的文档中应该很简单http://doc.prestashop.com/display/PS17/Tags但我没有看到它们