Prestashop 1.7 - 浏览器上一个按钮在产品页面上不起作用

发布于 2025-01-10 22:26:36 字数 153 浏览 3 评论 0原文

因此,我在我的产品页面上,当我进入页面底部、所有产品下方时,我点击“2”进入下一个页面。

我想返回到上一页,但如果我使用浏览器中的上一个按钮,它不起作用。

URL 发生变化,但页面不刷新并停留在页面“2”。

有人知道为什么吗?

谢谢。

So I'm on my products page, when I go at the bottom of my page, underneath all my products and I clic on "2" to go to the next page it works.

I want to go back to the previous page, but if I use the previous button from my browser it don't work.

The URL change but the page doesn't refresh and stay on the page "2".

Someone know why ?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

聆听风音 2025-01-17 22:26:36

完全是偶然,我通过在 pagination.tpl 文件中添加一些 JavaScript 解决了这个问题。

这里是代码:

window.addEventListener('popstate', function (event) {
   location.reload();
});

如果我理解正确的话,当 URL 更改时它会刷新页面。

希望它能帮助一些人!

Completely by accident I solved the issue by adding a bit of JavaScript in my pagination.tpl file.

Here the code :

window.addEventListener('popstate', function (event) {
   location.reload();
});

If I understand right, it refresh the page when there a URL change.

Hope it will help some people !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文