【问题标题】:how to show individual discount applied while chackout?如何在结帐时显示应用的个人折扣?
【发布时间】:2014-11-12 10:58:11
【问题描述】:

我已成功在我的magento商店中应用购物车规则,但在计算总计时,购物车中直接显示总折扣。

它不显示适用于哪个产品的个别折扣价格。

如何显示个人折扣让客户知道我在哪个产品上获得了折扣?

【问题讨论】:

    标签: magento show checkout discount


    【解决方案1】:

    要在结帐时获取每个产品的单独折扣金额,您可以执行以下操作:

    $quote = Mage::getSingleton('checkout/session')->getQuote();
    foreach ($quote->getAllItems() as $item){
        $discount = $item->getDiscountAmount();
    // $discount is the discount amount for the individual item
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-07-08
      • 2022-10-15
      • 2015-11-03
      • 2021-01-10
      • 1970-01-01
      • 2014-11-09
      • 2015-12-06
      • 2020-11-30
      相关资源
      最近更新 更多