【问题标题】:Minicart product amount display MagentoMinicart 产品数量显示 Magento
【发布时间】:2015-05-06 06:58:25
【问题描述】:

例如,我有一个关于迷你车的问题:如果我的购物车中有 3 件独特的产品,每件 30 件,那么迷你车显示的总数量为 90。

如何让迷你购物车显示独特产品的数量,所以只有 3 个?

【问题讨论】:

    标签: php ajax magento


    【解决方案1】:

    在您的代码中将$this->getSummaryCount() 替换为Mage::helper('checkout/cart')->getItemsCount();

    app/design/frontend/your_theme/default/template/checkout/cart/minicart.phtml

    $_cartQty = Mage::helper('checkout/cart')->getItemsCount();
    if(empty($_cartQty)) {
        $_cartQty = 0;
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-01-13
      • 2019-12-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-09-28
      • 2015-04-30
      • 1970-01-01
      相关资源
      最近更新 更多