Please tell me How your framework update the cart Grand total on the fly.As I noticed that it is embedding a span element when executing this code.
What i noticed that this part of code is updating the cart without refresh or say it as with ajax call.
what I wants to know is that , I have spend a whole day to search the file from where this piece of code is generating the span element because I wants to customize it but failed.I am unable to find the source from where it is generated like this in inspect element.
I want to use the total amount/$cart_total into another element but the problem i got is that I am unable get update on the fly on the other element , what I think that it is because of id attribute used instead of class to update the cart, so unable to update on the fly/with ajax on the same page with similar ids.So what is the solution to this problem.how can I use the total amount again on the same page and upadate on the fly as my previous element is doing.
Unfortunately, the code that you provided as example is not the default from Magento 22.214.171.124.
Since that is a custom solution that has been built in your store, there is no way to tell exactly the location of the code that generates those values.
Have you installed a custom extension for the checkout or are there major customizations in your shopping cart page?
Magento have 'collect' function to calculate G.T. in
if you wants to do some stuff you can override the collect method.
If you wants to get value of grand total here is the code :
$quote = Mage::getModel('checkout/session')->getQuote(); $quoteData= $quote->getData(); $grandTotal=$quoteData['grand_total'];
Thanks for your response.
Yes there is a lot of customization in shopping cart.And I have found the Jquery function which is called from ajax when user add an item to the cart.That ajax call is doing a trick to update it on the fly.