Magento购物车未在阿拉伯商店视图中更新数量 [英] Magento cart not updating quantity in arabic store view

查看:55
本文介绍了Magento购物车未在阿拉伯商店视图中更新数量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在安装Magento 1.8.1时遇到以下问题.我有两个商店视图,分别是英语(默认)和阿拉伯语.

I have the following issue with a Magento 1.8.1 installation. I have two store views, English, which is default, and Arabic.

在英语商店视图中,如果我将产品添加到购物车中,则可以通过在数量框中输入新数量并单击更新购物车来更改数量,这将更改数量和总计.

In the English store view if I add a product to the shopping cart I am able to modify the quantity by inputing the new quantity in the qty box and clicking Update Shopping Cart, which changes the quantity and the totals.

但是,当我切换到阿拉伯语商店视图时,无法更新任何产品的数量.我输入了所需的数量并按了update,但是页面仅用1件产品重新加载,并且总数未更改.经过测试,我发现购物车仅对​​数量超过31的产品进行更新.

However, when I switch over to the Arabic store view, I can't update the quantity of any products. I input the desired quantity and press update, but the page reloads with only 1 piece of the product, and the totals are unchanged. I've tested and I've noticed that the cart only updates only for quantities over 31.

我已经尝试过/检查了以下内容:

I've tried / checked the following:

  1. 此行显示在cart.phtml中-getBlockHtml('formkey'); ?>
  2. 这行出现在cart.phtml-getChildHtml('form_before')吗?>
  3. 没有Javascript错误
  4. 我使用的是默认购物车功能,没有Ajax或其他任何功能.
  5. 我尝试用基本文件夹中的原始文件替换cart.phtml文件,其行为是相同的.
  6. 我尝试将商店ID添加到URL,但这不能解决问题.
  7. 手动清除缓存.
  8. php日志中没有错误.
  9. 我已经在目录/库存"中设置了管理库存"并进行了索引编制,但这并不能解决问题.

任何想法都将不胜感激.

Any ideas will be greatly appreciated.

谢谢, 亚历克斯

推荐答案

尝试通过在本地"上覆盖此代码来删除此代码

        if (isset($params['qty'])) {
            $filter = new Zend_Filter_LocalizedToNormalized(
                    array('locale' => Mage::app()->getLocale()->getLocaleCode())
            );
            $params['qty'] = $filter->filter($params['qty']);
        }

来自app \ code \ core \ Mage \ Checkout \ controllers \ CartController.php(第183行)

from app\code\core\Mage\Checkout\controllers\CartController.php (line 183)

创建以覆盖 app \ code \ local \ Mage \ Checkout \ controllers \ CartController.php

Create to overrride app\code\local\Mage\Checkout\controllers\CartController.php

并通过将其覆盖在本地"上将其删除

    if (isset($data['qty'])) {
        $cartData[$index]['qty'] = $filter->filter(trim($data['qty']));
    }

来自app \ code \ core \ Mage \ Checkout \ controllers \ CartController.php(第428行)

from app\code\core\Mage\Checkout\controllers\CartController.php (line 428)

创建以覆盖 app \ code \ local \ Mage \ Checkout \ controllers \ CartController.php

Create to override app\code\local\Mage\Checkout\controllers\CartController.php

也可以通过在本地"上覆盖它来删除它

    if (isset($params['qty'])) {
        $filter = new Zend_Filter_LocalizedToNormalized(
            array('locale' => Mage::app()->getLocale()->getLocaleCode())
        );
        $params['qty'] = $filter->filter($params['qty']);
    }

来自app \ code \ core \ Mage \ Checkout \ controllers \ CartController.php(第327行)

from app\code\core\Mage\Checkout\controllers\CartController.php (line 327)

创建以覆盖 app \ code \ local \ Mage \ Checkout \ controllers \ CartController.php

Create to override app\code\local\Mage\Checkout\controllers\CartController.php

这篇关于Magento购物车未在阿拉伯商店视图中更新数量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆