1

When I purchase any product cart count not update when I refresh that page at that time cart count update. I want to need without refresh it's been update.

/app/design/frontend/theme/default/template/checkout/cart/minicart.phtml

<div class="form-group">
<a href="<?php echo $this->getUrl('checkout/cart'); ?>" class="cart-link <?php if($_cartQty <= 0): ?> no-count<?php endif; ?>">
    <!--<span class="cartbtn"><img src="<?php //echo $this->getSkinUrl('images/minicart.png'); ?>" alt="Cart"></span>--->
    <div class="Shopping_Cart">
     <div class="cart_ttl"><span><?php echo $this->__('') ?></span></div>
    <span class="count">(<?php echo $_cartQty; ?>)-</span>
    <span class="label"><?php echo $this->__(''); ?></span>
    <span class="price"><?php echo Mage::helper('checkout')->formatPrice($this->getQuote()->getSubtotal()) ?></span>
    <!---<span class="dropdown-arrow dropdown-arrow-minicart"></span>  -->
</a>
</div>
  <div id="header-cart" class="block block-cart skip-content">
        <?php echo $this->getChildHtml('minicart_content');?>
  </div>
</div>

enter image description here

  • Post your ajax addtocart code in question – Prashant Valanda Dec 19 '16 at 6:03
  • <div class="cntnt"> <span style="color:red;"> <?php echo $this->getMessagesBlock()->getGroupedHtml() ?></span> <?php echo $this->getChildHtml('form_before') ?> <form action="<?php echo $this->getUrl('checkout/cart/updatePost') ?>" method="post"> <?php echo $this->getBlockHtml('formkey'); ?> <table class="table table-hover clearfix cart-table data-table form-group" id="shopping-cart-table"> – Karma Developers Dec 19 '16 at 6:16
  • Please help me on this – Karma Developers Dec 19 '16 at 6:58
  • You have posted page code not ajax code and add code in question not in comment – Prashant Valanda Dec 19 '16 at 7:00
  • 1
    Any one help me on this – Karma Developers Dec 19 '16 at 10:35

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.