0

I was working on adding a section to Magento Onepage Checkout and after running into many issues I went back and deleted all the modules and all the files attached to them. I go back to Checkout and now everything is working normally except that the "Continue" button is stuck at the billing section when I'm logged in. I believe it is connected to the onclick="billing.save() inline function. I am new to Magento and new to Stack Overflow so here is my code for billing.phtml. Let me know if any more information is needed or if I missed some details in this post. I'm eager to learn how to ask questions properly in StackOverflow in order to get the most out of this site.

*****
    <div class="buttons-set" id="billing-buttons-container">
        <p class="required"><?php echo $this->__('* Required Fields') ?></p>
        <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
        <span class="please-wait" id="billing-please-wait" style="display:none;">
            <img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
        </span>
    </div>

*****
<script type="text/javascript">
//<![CDATA[
    var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
    var billingForm = new VarienForm('co-billing-form');

    //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
    $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);

    var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
//]]>
</script>

Any help is much appreciated. Thanks in advance!

jonullberg
  • 27
  • 1
  • 6
  • FYI, Magento now has its own StackExchange site: http://magento.stackexchange.com – John Conde Mar 20 '13 at 18:41
  • Thank you, I'll send it over there. – jonullberg Mar 20 '13 at 18:56
  • Can you check firebug console if there is any javascript errors ? – Meabed Mar 20 '13 at 18:56
  • Wow, I can't believe I didn't look at that earlier. So it says `Type Error: "checkout" is undefined onclick()` I'm assuming that this has to do with when the JS files are being loaded. If I understand it though, the JS files should be being loaded in the head while this inline code should be in the body, meaning it should understand the inline "onclick" function. Am I missing something else? – jonullberg Mar 20 '13 at 19:02

1 Answers1

0

For me i just go to system->configuration->shipping methods and change Flat rate shipping method Yes to No and then No to Yes then save config. After this checkout billing step works fine.

Chandresh
  • 361
  • 2
  • 7