Am using magento 1.9.3
am trying to add new steps after shipping method
called DELIVERY INSTRUCTIONS
i refer this link [ https://www.fontis.com.au/blog/adding-step-onepage-checkout].
I did everything same in that link.
But DELIVERY INSTRUCTIONS
Continue button not moving to newt step. Showing some error in console like this
This my deliveryinstructions.phtml
code
<form id="co-deliveryinstructions-form" action="">
<div id="checkout-deliveryinstructions-load">
<!-- Content loaded dynamically -->
</div>
<script type="text/javascript">
//<![CDATA[
var deliveryinstructionsMethod = new DeliveryinstructionsMethod('co-deliveryinstructions-form', "<?php echo $this->getUrl('checkout/onepage/saveDeliveryinstructionsMethod') ?>");
//]]>
</script>
<div id="onepage-checkout-deliveryinstructions-additional-load">
<?php echo $this->getChildHtml('additional') ?>
</div>
<div class="buttons-set" id="deliveryinstructions-buttons-container">
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
<button type="button" class="button" onclick="deliveryinstructionsMethod.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
<span id="deliveryinstructions-please-wait" class="please-wait" style="display:none;">
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo Mage::helper('core')->quoteEscape($this->__('Loading next step...')) ?>" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Loading next step...')) ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
</span>
</div>
</form>
And my second questions
Add progress title in YOUR CHECKOUT PROGRESS
Skin\frontend\base\default\js\opcheckout.js
setShippingMethod: function() {
//this.nextStep();
this.gotoSection('deliveryinstructions', true);
//this.accordion.openNextSection(true);
},
//code added
setDeliveryinstructions: function() {
//this.nextStep();
this.gotoSection('payment', true);
//this.accordion.openNextSection(true);
},
//code added
How can i fix this two errors…?
Thanks in advance
Best Answer
Finally i got the answer for 1st qestion. But i want to add
YOUR CHECKOUT PROGRESS
tab. 1st question answer is add new function inskin\frontend\base\default\js\opcheckout.js
After
shipping method
line no -550 to 600
add following codeAnd
deliveryinstructions.phtml