2

I don't know what I did wrong, but currently my progess block at the onepage checkout is not working anymore, but for a few days it works really great.

I found some solutions and have tried some fixes for this problem, but nothing works for me :(.

My checkout.xml looks as follows:

<reference name="right">
  <action method="unsetChildren"></action>
  <block type="page/html_wrapper" name="checkout.progress.wrapper" translate="label">
    <label>Checkout Progress Wrapper</label>
    <action method="setElementId"><value>checkout-progress-wrapper</value></action>
    <block type="checkout/onepage_progress" name="checkout.progress" before="-" template="checkout/onepage/progress.phtml">
      <block type="checkout/onepage_progress" name="billing.progress" template="checkout/onepage/progress/billing.phtml"></block>
      <block type="checkout/onepage_progress" name="shipping.progress" template="checkout/onepage/progress/shipping.phtml"></block>
      <block type="checkout/onepage_progress" name="shippingmethod.progress" template="checkout/onepage/progress/shipping_method.phtml"></block>
      <block type="checkout/onepage_progress" name="payment.progress" template="checkout/onepage/progress/payment.phtml"></block>
    </block>
  </block>
</reference>

I think it looks ok and I didn't changed it in the past. Currently I am using a custom theme and how I said, for a few days it was working without problems.

My last update was the customization of customtheme/template/checkout/onepage/payment/methods.phtml which I copied from base/default/template/checkout/onepage/payment/methods.phtml and now looks as follows:

<?php $methods = $this->getMethods(); ?>
<?php $oneMethod = count($methods) <= 1; ?>
<?php if (empty($methods)): ?>
  <dt><?php echo $this->__('No Payment Methods'); ?></dt>
<?php else: ?>
  <?php foreach ($methods as $_method): ?>
    <?php $_code = $_method->getCode(); ?>
    <?php if ( ( $this->getQuote()->getShippingAddress()->getShippingMethod() == 'payonpickup_payonpickup' && ($_code == 'bankpayment' || $_code == 'paypal_express' || $_code == 'payonpickup') ) || $this->getQuote()->getShippingAddress()->getShippingMethod() == 'freeshipping_freeshipping' ):?>
        <dt>
        <?php if(!$oneMethod): ?>
        <input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" title="<?php echo $this->escapeHtml($_method->getTitle()) ?>" onclick="payment.switchMethod('<?php echo $_code ?>')"<?php if($this->getSelectedMethodCode()==$_code): ?> checked="checked"<?php endif; ?> class="radio" />
        <?php else: ?>
        <span class="no-display"><input id="p_method_<?php echo $_code ?>" value="<?php echo $_code ?>" type="radio" name="payment[method]" checked="checked" class="radio" /></span>
        <?php $oneMethod = $_code; ?>
        <?php endif; ?>
        <label for="p_method_<?php echo $_code ?>">
            <?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?>
            <?php echo $this->getMethodLabelAfterHtml($_method); ?>
        </label>
    </dt>
    <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
    <dd><?php echo $html; ?></dd>
    <?php endif; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
<?php echo $this->getChildChildHtml('additional'); ?>
<script type="text/javascript">
  //<![CDATA[
  <?php echo $this->getChildChildHtml('scripts'); ?>
  payment.init();
  <?php if (is_string($oneMethod)): ?>
  payment.switchMethod('<?php echo $oneMethod ?>');
  <?php endif; ?>
  //]]>
</script>

But I don't know, if this file caused the problem, because when I undo this changes (delete methods.phtml), the progress block is still not working.

I hope you can help me, because I dispair :/

3

I have revised code of this extension. I have saw that this extension rewrites \magento\skin\frontend\base\default\js\opcheckout.js function. After comparing with prev version I noticed that method gotoSection has two params but not one like before. In short, just change in file \magento\app\design\frontend\base\default\template\aromicon\gua\gua.phtml:

Checkout.prototype.gotoSection = function(section){
                var sectionElement = $('opc-'+section);
                sectionElement.addClassName('allow');
                this.accordion.openSection('opc-'+section);
                this.reloadProgressBlock(section);
                /**aromicon gua code*/
                try{ga('send', 'pageview', {'page': '<?php echo $this->getCheckoutUrl() ?>/'+section,'title': section});}catch(e){
                    console.log(e);
                }
        };

to

Checkout.prototype.gotoSection = function(section, reloadProgressBlock){

            if (reloadProgressBlock) {
                this.reloadProgressBlock(this.currentStep);
            }
            this.currentStep = section;
            var sectionElement = $('opc-' + section);
            sectionElement.addClassName('allow');
            this.accordion.openSection('opc-' + section);
            if(!reloadProgressBlock) {
                this.resetPreviousSteps();
            }
                /**aromicon gua code*/
                try{ga('send', 'pageview', {'page': '<?php echo $this->getCheckoutUrl() ?>/'+section,'title': section});}catch(e){
                    console.log(e);
                }
        };

For me it's work fine. Hopefully someone it will be useful.

1

The error source was the "aromicon google universal analytics" extension, don't know why but if I deactivate this extension the checkout progress is working again :).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.