Magento 获取定期配置文件的购物车总金额

Magento 获取定期配置文件的购物车总金额,magento,magento-1.9,Magento,Magento 1.9,我只是花了几个小时试图得到这个简单的信息:我如何获得客户购物车的总金额与它的产品 客户刚刚在购物车中添加了一个重复配置文件产品,并且已经决定使用哪种配送方式。客户只需点击“下订单”和所有信息即可完成订单。付款方式是这个模块:我对它做了一些修改,以支持经常性的个人资料产品 我试图运行的代码位于我的类中,该类实现了Mage\u Payment\u Model\u recurtive\u Profile\u MethodInterfaceatsubmitRecurringProfile() 在创建订单

我只是花了几个小时试图得到这个简单的信息:我如何获得客户购物车的总金额与它的产品

客户刚刚在购物车中添加了一个重复配置文件产品,并且已经决定使用哪种配送方式。客户只需点击“下订单”和所有信息即可完成订单。付款方式是这个模块:我对它做了一些修改,以支持经常性的个人资料产品

我试图运行的代码位于我的类中,该类实现了
Mage\u Payment\u Model\u recurtive\u Profile\u MethodInterface
at
submitRecurringProfile()

在创建订单之前,我如何获得总价值(定期配置文件和运输成本)

此简单代码返回“0”:

$total = Mage::getSingleton('checkout/session')->getQuote()->getTotals();
当你看着

interface Mage_Payment_Model_Recurring_Profile_MethodInterface

方法有两个
参数

  • Mage\u Payment\u Model\u recurtive\u Profile$Profile
  • Mage\u Payment\u Model\u Info$paymentInfo

    public function submitRecurringProfile(Mage\u Payment\u Model\u recurtive\u Profile$Profile,Mage\u Payment\u Model\u Info$paymentInfo)

  • {

    $trialamount=$profile->getTrialBillingAmount();
    //获取试用金额

    $billamount=$profile->getBillingAmount();
    //获取账单金额

    $initialamount=$profile->getInitAmount();
    //获取初始金额

    $ShippingAmount=$profile->getShippingAmount()
    //获取发货金额

    $totalprice=$profile->getShippingAmount()+$profile->getBillingAmount();
    //获取总价


    }

    您在哪个文件上?你使用什么结账系统?@Claudiu刚刚在问题中添加了更多细节。谢谢@keyur shar,但它还没有完成。我分别得到了Null,订阅值,Null。我还需要获取发货值。
    $profile->getShippingAmount()+$profile->getBillingAmount()给了我想要的值!德克萨斯州!请编辑您的答案,以便我将其作为“答案”进行检查;)很高兴听到它对你有帮助@Matheusjarimb,,我已经更新了我的答案
    
    app\code\core\Mage\Payment\Model\Recurring\Profile\MethodInterface.php