I have implemented an Ajax based button on the listing page that will add the product through Ajax. However i am having problems with the cart shown on the top. I want to update the cart as well.
The cart phtml file is located in checkout/cart/topbar.phtml
I am new to coding, since we need to give prototype.js http path to the file to process i can not find any http path to topbar.phtml
so i can update the div with the content. If anything is unclear please let me know.
I tried to be very specific about my problem.
I want to update the div containing top cart, the cart phtml is already there its being called from $this->getChildHtml('topcart')
the file path in server is checkout/cart/topbar.phtml
Have you considered using one of these ready made extensions?
In the admin section go to
System -> Configuration -> developer
after that go to the top left of the page and change the Current Configuration Scope to "Main website" and then change "Template Path Hints" and "Add Block Names to Hints" to Yes
Now, when you open the magento store you'll see the block names of every magento object, so look for the one you need and finally do:
$this->loadLayout();
$block = $this->getLayout()->getBlock('header_cart');