Guest User

Untitled

a guest
Jan 17th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. Mage::getSingleton('checkout/type_onepage')->getQuote()->getShippingAddress()->getCountryId()
  2.  
  3. $this->getQuote()->getShippingAddress()->getCountry()
  4.  
  5. app/design/base/default/template/checkout/onepage/shipping_method/available.phtml
  6.  
  7. <?php //Show extra shipping options only if the shipping address is outside of FRANCE ?>
  8. <script type="text/javascript">
  9.  
  10. var countryID = '<?= Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getData('country_id') ?>';
  11. jQuery('#ownTransport')[countryID == 'FR' ? 'hide' : 'show']();
  12.  
  13. </script>
  14.  
  15. app/design/XXX/XXX/template/checkout/onepage/shipping_method.phtml
  16.  
  17. <form id="co-shipping-method-form" class="stack-form" action="">
  18. <div id="checkout-shipping-method-load">
  19. <?php echo $this->getChildHtml('available') ?>
  20. </div>
  21.  
  22. <script type="text/javascript">
  23. //<![CDATA[
  24. var shippingMethod = new ShippingMethod('co-shipping-method-form', "<?php echo $this->getUrl('checkout/onepage/saveShippingMethod') ?>");
  25. //]]>
  26. </script>
  27.  
  28. <div id="onepage-checkout-shipping-method-additional-load">
  29. <?php echo $this->getChildHtml('additional') ?>
  30. </div>
  31.  
  32. <?php //ADD AMASTY FIELDS ?>
  33.  
  34. <?php //Show extra shipping options only if the shipping address is outside of FRANCE ?>
  35.  
  36. <div id="ownTransport">
  37. <?php
  38. echo Mage::helper('amorderattr')->fields('shipping_method');
  39. ?>
  40. </div>
  41.  
  42. <div id="shipping-method-buttons-container" class="buttons-set">
  43. <button class="button" onclick="shippingMethod.save()"><?php echo $this->__('Continue') ?></button>
  44. <span class="please-wait" id="shipping-method-please-wait" style="display:none;"><?php echo $this->__('Loading') ?></span>
  45. </div>
Add Comment
Please, Sign In to add comment