payment.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <?php $payments = $parentThis['payments']; ?>
  11. <?php $current_payment_method = $parentThis['current_payment_method']; ?>
  12. <div class="onestepcheckout-payment-method">
  13. <p class="onestepcheckout-numbers onestepcheckout-numbers-3"><?= Yii::$service->page->translate->__('Payment Method');?></p>
  14. <div class="payment_info">
  15. <div class="payment-methods">
  16. <dl id="checkout-payment-method-load">
  17. <?php if(is_array($payments) && !empty($payments)): ?>
  18. <?php foreach($payments as $payment => $info): ?>
  19. <?= $info['style']; ?>
  20. <?php
  21. if($info['checked'] == true):
  22. $checked = 'checked="checked"';
  23. else:
  24. $checked = '';
  25. endif;
  26. ?>
  27. <dt>
  28. <input <?= $checked; ?> style="display:inline" id="p_method_<?= $payment ?>" value="<?= $payment ?>" name="payment_method" title="<?= $info['label']; ?>" class="radio validate-one-required-by-name" <?= ($current_payment_method == $payment) ? 'checked="checked"' : '' ; ?> type="radio">
  29. <label for="p_method_<?= $payment ?>"><?= Yii::$service->page->translate->__($info['label']) ?></label>
  30. </dt>
  31. <dd id="container_payment_method_<?= $payment ?>" class="payment-method" style="">
  32. <ul class="form-list" id="payment_form_<?= $payment ?>" style="">
  33. <li>
  34. <?php if(isset($info['imageUrl']) && !empty($info['imageUrl'])): ?>
  35. <img style="margin:10px 0 8px 0" src="<?= $info['imageUrl'] ?>">
  36. <?php endif; ?>
  37. </li>
  38. </ul>
  39. </dd>
  40. <?php endforeach; ?>
  41. <?php endif; ?>
  42. </dl>
  43. </div>
  44. </div>
  45. </div>