I am trying to process a transaction through code, in some ways it goes fine, but when i actually interact with it from a frontend controller something strange happens:

    var_dump($quoteObj->getSubtotal(), false);

    $ccInfo = array();
    // assign payment method
    if ($payment_method == "authorizenet") 
        $quotePaymentObj = $quoteObj->getPayment();
    else {
        $quotePaymentObj = $quoteObj->getPayment();




    The results of the var_dumps are as followed:
    string '660.0000' (length=8)
    string '660.0000' (length=8)
    float 0

Any one any idea how collectTotals resets it to 0? I have looked in the method, but cannot get a clear answer.

I also followed some advice and started disabling all modules that touch the sales_quote_collect_after, when that didn't work, i also tried to remove the event configs from their xmls, which resulted in the same (meanwhile flushing my caches).

So the result of this problem is that i cannot capture, there is a 0 amount. And even when i don't manually trigger the collectTotals, it is done somewhere else and results in 0.

Any insights, or pointers in the right direction will be appreciated.

  • Firing from the hip here, but what if you exclude the $quoteObj->save() prior to running collectTotals?
    – travisw
    Aug 14, 2015 at 16:25
  • I tried that before the current scenario, but i just confirmed again, and yeah same issue. Aug 14, 2015 at 16:38
  • classyllama.com/blog/… May give you some more insight into the wormhole that is collectTotals :)
    – B00MER
    Aug 16, 2015 at 8:16


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.