简体   繁体   English

Prestashop 1.7.7.8 Ajax 点击添加到购物车按钮时购物车不更新

[英]Prestashop 1.7.7.8 Ajax cart doesn't update when Add to cart buttons are clicked

We are working on a Prestashop website with Prestashop 1.7.7.8, first we tried a theme called Akira, and after a few days we finally changed it to Warehouse theme.我们正在使用 Prestashop 1.7.7.8 开发 Prestashop 网站,首先我们尝试了一个名为 Akira 的主题,几天后我们终于将其更改为 Warehouse 主题。

The problem started when we changed the theme.当我们改变主题时,问题就开始了。 Have tried also with the Classic Theme, and doesn't work either.也尝试过经典主题,但也不起作用。

When you click any "Add to cart" button, the button shows a spinner for 1 second, then nothing happens.当您单击任何“添加到购物车”按钮时,该按钮会显示一个微调器 1 秒钟,然后没有任何反应。 If you refresh the page, then the cart item count is increased by 1 unit, which is right, but need to update without refreshing.如果刷新页面,那么购物车商品数量会增加 1 个单位,这是对的,但需要在不刷新的情况下进行更新。

If you click on the cart icon, the dropdown opens, but you can't delete any item, the trash button doesn't work.如果您单击购物车图标,下拉菜单将打开,但您无法删除任何项目,垃圾桶按钮不起作用。 But if you decrease the quantity of that product, the change is saved (the cart item count doesn't update, anyway, until you refresh the page, but when you reload, the unit is decreased).但是,如果您减少该产品的数量,则会保存更改(无论如何,购物车项目计数不会更新,直到您刷新页面,但是当您重新加载时,单位会减少)。

We have tried with various PHP versions: 7.4, 7.3, 7.2... nothing seems to work.我们尝试了各种 PHP 版本:7.4、7.3、7.2 ......似乎没有任何效果。 Also, the PS cache is disabled and deleted between every attempt.此外,每次尝试之间都会禁用并删除 PS 缓存。

Tried a few times to disable all modules in the module manager section, also have checked the options of overrides, disabling it, and the non-native modules in the performance section didn't help anyway.尝试了几次禁用模块管理器部分中的所有模块,还检查了覆盖选项,禁用它,并且性能部分中的非本机模块无论如何都没有帮助。

When we run in debug mode, nothing strange appears.当我们在调试模式下运行时,没有什么奇怪的出现。 In the Chrome inspector, there isn't any javascript error (only some yellow warnings about js.map missing files).在 Chrome 检查器中,没有任何 javascript 错误(只有一些关于 js.map 缺少文件的黄色警告)。

Anyone to help, please?请问有人帮忙吗?

Check the cart answer in the Chrome inspector Network TAB with enabled debug mode.在启用调试模式的 Chrome 检查器网络选项卡中检查购物车答案。 Maybe you can see the error message也许你可以看到错误信息在此处输入图像描述

This error can sometimes occur even if you are not using HTTPS.即使您不使用 HTTPS,有时也会出现此错误。

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

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