1

I'm customizing magento 1.9.2.4 onepage checkout, but when i use right sidebar cart with totals, it doesn't update automatically when i change shipping methods and payment methods

enter image description here

I tried few jQuery solutions like

var accordion = new Accordion('checkoutSteps', '.step-title', true);
    <?php if($this->getActiveStep()): ?>
    accordion.openSection('opc-<?php echo $this->getActiveStep() ?>');
    <?php endif ?>
    var checkout = new Checkout(accordion,{
        progress: '<?php echo $this->getUrl('checkout/onepage/progress') ?>',
        review: '<?php echo $this->getUrl('checkout/onepage/review') ?>',
        saveMethod: '<?php echo $this->getUrl('checkout/onepage/saveMethod') ?>',
        failure: '<?php echo $this->getUrl('checkout/cart') ?>'}
    );
      Accordion.prototype.openSection = Accordion.prototype.openSection.wrap(
            function(parentMethod, section) {
                // Call parent method
                parentMethod(section);
            jQuery.get('<?php echo Mage::getBaseUrl()?>/checkout/onepage/',function(data){

            var datax = jQuery.parseHTML(data);
             // .tblgt is cart total div class
            jQuery(datax).find('.tblgt').each(function(){
                  jQuery('.tblgt').html(jQuery(this).html());
            });
              });
         });

the above solution refresh cart in every step but it also refresh my address selections .

is there have any other solution for update the cart

  • You can refresh totals by ajax on every step. Also check you can set up it on admin panel on onestepcheckout module. Ajax on checkout or simillar config. – Konrad Siamro Feb 6 '17 at 9:39
  • this is magento default checkout i couldn't able to find that kind of settings :) – Suneth Kalhara Feb 6 '17 at 9:42

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.