SHARE
TWEET

methods.phtml

a guest Apr 1st, 2015 260 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /**
  3.  * Magento
  4.  *
  5.  * NOTICE OF LICENSE
  6.  *
  7.  * This source file is subject to the Academic Free License (AFL 3.0)
  8.  * that is bundled with this package in the file LICENSE_AFL.txt.
  9.  * It is also available through the world-wide-web at this URL:
  10.  * http://opensource.org/licenses/afl-3.0.php
  11.  * If you did not receive a copy of the license and are unable to
  12.  * obtain it through the world-wide-web, please send an email
  13.  * to license@magentocommerce.com so we can send you a copy immediately.
  14.  *
  15.  * DISCLAIMER
  16.  *
  17.  * Do not edit or add to this file if you wish to upgrade Magento to newer
  18.  * versions in the future. If you wish to customize Magento for your
  19.  * needs please refer to http://www.magentocommerce.com for more information.
  20.  *
  21.  * @category    design
  22.  * @package     base_default
  23.  * @copyright   Copyright (c) 2014 Magento Inc. (http://www.magentocommerce.com)
  24.  * @license     http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
  25.  */
  26. ?>
  27. <?php
  28. /**
  29.  * One page checkout payment methods
  30.  *
  31.  * @var $this Mage_Checkout_Block_Onepage_Payment_Methods
  32.  */
  33. ?>
  34.  
  35. <?php
  36.     $methods = $this->getMethods();
  37.     $oneMethod = count($methods) <= 1;
  38. ?>
  39.  
  40.  
  41. <?php if (empty($methods)): ?>
  42.     <dt>
  43.         <?php echo $this->__('No Payment Methods') ?>
  44.     </dt>
  45. <?php else:
  46.     foreach ($methods as $_method):
  47.         $_code = $_method->getCode();
  48. ?>
  49.     <dt>
  50.     <?php if(!$oneMethod): ?>
  51.         <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" />
  52.     <?php else: ?>
  53.         <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>
  54.         <?php $oneMethod = $_code; ?>
  55.     <?php endif; ?>
  56.         <label for="p_method_<?php echo $_code ?>"><?php echo $this->escapeHtml($this->getMethodTitle($_method)) ?> <?php echo $this->getMethodLabelAfterHtml($_method) ?></label>
  57.     </dt>
  58.     <?php if ($html = $this->getPaymentMethodFormHtml($_method)): ?>
  59.     <dd>
  60.         <?php echo $html; ?>
  61.     </dd>
  62.     <?php endif; ?>
  63. <?php endforeach;
  64.     endif;
  65. ?>
  66.  
  67. <?php
  68. $isCodeAvalibale=0;
  69.     foreach ($this->getMethods() as $_method):
  70.         $_code = $_method->getCode();
  71.     if(cashondelivery=='cashondelivery'):
  72.     $isCodeAvalibale=1;
  73.     endif;
  74.     endforeach;
  75. if($isCodeAvalibale==0):
  76. echo Mage::helper('payment')->__('Code is not avaliable.'));
  77. endif;
  78. ?>
  79. <?php echo $this->getChildChildHtml('additional'); ?>
  80. <script type="text/javascript">
  81.     //<![CDATA[
  82.     <?php echo $this->getChildChildHtml('scripts'); ?>
  83.     payment.init();
  84.     <?php if (is_string($oneMethod)): ?>
  85.     payment.switchMethod('<?php echo $oneMethod ?>');
  86.         <?php endif; ?>
  87.     //]]>
  88. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top