4

When I add items to my cart the grand total updates correctly but when I visit /checkout/cart/ for the first time the grand total is zero although the items are listed correctly.

Refreshing the cart page corrects the total, so this only happens on the first view. Subsequent visits to the cart page are correct so I'm guessing it's something to do with the session but don't know where to start.

Any help appreciated.

Tom
  • 41
  • 1
  • 3

2 Answers2

1

That might be related to an extension that hooks into the collectTotals() methods, which are called on every refresh of the cart. If an extension relies on data that is not present yet at the first time the totals are collected, it might mess them up.

To debug, search for _collect_totals_ and _collect_totals_ in all config.xml files below app/code and see in which modules you get results (excluding those from core/Mage). You'll find observer definitions for events like sales_quote_address_collect_totals_before.

Disable all extensions you find, and if this solves the problem, enable them again one by one until it appears again. Then it's time to examine the observer code and/or contact the extension vendor.

Fabian Schmengler
  • 65,791
  • 25
  • 187
  • 421
  • Great. I would first check if any extension rewriting order-total by this link. – Adarsh Khatri Jun 08 '15 at 09:27
  • You can probably find details in the exception log after you enable it, as exception are suppressed, but still logged. The module should probably depend on Mage_Sales and/or Mage_Schipment to work correctly - the information that is missing for these modules is address or shipping related. –  Jun 08 '15 at 09:28
0

Try to selectively disable third-party modules:

app/etc/modules/*.xml

there must be a problem with one of them!

The reason can also be found by commenting in a third-party module config.xml in a way like this:

<global>
    <sales>
        <quote>
            <totals>
                 <multifees>
                     <class>multifees/sales_quote_total</class>
                     <after>subtotal,discount,tax,shipping</after>
                     <before>depositppr,grand_total</before>
                     <renderer>multifees/checkout_total</renderer>
                 </multifees>
            </totals>
        </quote>
    </sales>
</global>

You can also try to adjust <before> or <after>

And to debug the model specified in <class>...</class>

Neklo.com
  • 2,379
  • 1
  • 11
  • 19