Internet Explorer jQuery 重定向

发布于 2024-12-18 03:08:53 字数 756 浏览 3 评论 0原文

我目前正在使用 http://thetradinghouse.co.nz,在访问购物车过程中遇到问题所采取的是。

  • 选择类别。

  • 选择产品并打开产品页面。

  • 单击“添加到购物车”。

  • 产品添加到购物车,但页面重定向到带有 uri 的类别页面 http://www.thetradinghouse.co.nz/sporting-goods/index.php?route=checkout/cart

上述步骤应该只加载 http://www.thetradinghouse.co .nz/index.php?route=checkout/cart 就像在 Chrome 和 Firefox 中一样,

我正在使用以下 SEO 模块 并已与开发者取得联系我被这个问题难住了。

这是指向我的product.tpl 和common.js 的链接,因为它太大而无法在这里实现。

I am currently working on http://thetradinghouse.co.nz and I have an issue when accessing the cart the process that is taken is.

  • Select Category.

  • Select a product and open the products page.

  • Click add to cart.

  • The product adds to the cart but the page redirects to the category page with the uri http://www.thetradinghouse.co.nz/sporting-goods/index.php?route=checkout/cart

The above step should just load http://www.thetradinghouse.co.nz/index.php?route=checkout/cart Like it does in Chrome and Firefox

I am using the following SEO Module and have been in contact with the developer whom I have stumped with this issue.

Here is a link to my product.tpl and common.js as it was too big to implement here.

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

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

发布评论

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

评论(2

相守太难 2024-12-25 03:08:53

解决此问题的最佳方法是执行以下操作:

打开 /catalog/view/javascript/common.js

在该文件中查找 addToCart 函数,然后找到第一个实例

window.location.href = 'index.php?route=checkout/cart';

在它之后。将该行更改为

window.location.href = $('base').attr('href') + 'index.php?route=checkout/cart';

“保存”,并根据需要通过 FTP 上传到您的服务器

The best fix for this is to do the following

Open /catalog/view/javascript/common.js

Find the addToCart function in that file, and then find the first instance of

window.location.href = 'index.php?route=checkout/cart';

after it. Change that line to

window.location.href = $('base').attr('href') + 'index.php?route=checkout/cart';

Save, and upload to your server via FTP if necessary

叹梦 2024-12-25 03:08:53

我看起来 IE 不能很好地解释你的重定向。我尝试将

121: window.location.href = 'index.php?route=checkout/cart';

替换为绝对网址:

window.location.href = 'http:// /www.thetradinghouse.co.nz/index.php?route=checkout/cart'

I looks like IE is interpreting your redirect poorly. I'd try swapping

121: window.location.href = 'index.php?route=checkout/cart';

with an absolute url:

window.location.href = 'http://www.thetradinghouse.co.nz/index.php?route=checkout/cart'

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