Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
agreements.phtml
Go to the documentation of this file.
1 <?php
7 // @codingStandardsIgnoreFile
12 $billingAgreements = $block->getBillingAgreements();
13 $paymentMethods = $block->getWizardPaymentMethodOptions();
14 ?>
15 <div class="account-billing-agreements">
16  <?php if (count($billingAgreements) > 0): ?>
17  <?= $block->getChildHtml('pager') ?>
18  <div class="table-wrapper billing-agreements">
19  <table id="billing-agreements" class="data table table-billing-agreements">
20  <caption class="table-caption"><?= $block->escapeHtml(__('Billing Agreements')) ?></caption>
21  <thead>
22  <tr>
23  <th scope="col" class="col id"><?= $block->escapeHtml(__('Reference ID')) ?></th>
24  <th scope="col" class="col status"><?= $block->escapeHtml(__('Status')) ?></th>
25  <th scope="col" class="col created"><?= $block->escapeHtml(__('Created At')) ?></th>
26  <th scope="col" class="col updated"><?= $block->escapeHtml(__('Updated At')) ?></th>
27  <th scope="col" class="col payment"><?= $block->escapeHtml(__('Payment Method')) ?></th>
28  <th scope="col" class="col actions">&nbsp;</th>
29  </tr>
30  </thead>
31  <tbody>
32  <?php foreach ($billingAgreements as $item): ?>
33  <tr>
34  <td data-th="<?= $block->escapeHtml(__('Reference ID')) ?>" class="col id">
35  <?= $block->escapeHtml($block->getItemValue($item, 'reference_id')) ?>
36  </td>
37  <td data-th="<?= $block->escapeHtml(__('Status')) ?>" class="col status">
38  <?= $block->escapeHtml($block->getItemValue($item, 'status')) ?>
39  </td>
40  <td data-th="<?= $block->escapeHtml(__('Created At')) ?>" class="col created">
41  <?= $block->escapeHtml($block->getItemValue($item, 'created_at')) ?>
42  </td>
43  <td data-th="<?= $block->escapeHtml(__('Updated At')) ?>" class="col updated">
44  <?= $block->escapeHtml($block->getItemValue($item, 'updated_at')) ?>
45  </td>
46  <td data-th="<?= $block->escapeHtml(__('Payment Method')) ?>" class="col payment">
47  <?= $block->escapeHtml($block->getItemValue($item, 'payment_method_label')) ?>
48  </td>
49  <td data-th="" class="col actions">
50  <a href="<?= $block->escapeUrl($block->getItemValue($item, 'edit_url')) ?>"
51  class="action view">
52  <span><?= $block->escapeHtml(__('View')) ?></span>
53  </a>
54  </td>
55  </tr>
56  <?php endforeach; ?>
57  </tbody>
58  </table>
59  </div>
60  <?php else: ?>
61  <div class="message info empty">
62  <span><?= $block->escapeHtml(__('There are no billing agreements yet.')) ?></span>
63  </div>
64  <?php endif; ?>
65 
66  <?php if ($paymentMethods): ?>
67  <form action="<?= $block->escapeUrl($block->getCreateUrl()) ?>" method="post"
68  class="form form-new-agreement">
69  <fieldset class="fieldset">
70  <legend class="legend">
71  <span><?= $block->escapeHtml(__('New Billing Agreement')) ?></span>
72  </legend>
73  <br />
74  <p class="note">
75  <?= $block->escapeHtml(__('You will be redirected to the payment system website.')) ?>
76  </p>
77 
78  <div class="field payment method">
79  <div class="control">
80  <select id="payment_method" name="payment_method">
81  <option value=""><?= $block->escapeHtml(__('-- Please Select --')) ?></option>
82  <?php foreach ($paymentMethods as $code => $title): ?>
83  <option value="<?= $block->escapeHtml($code) ?>">
84  <?= $block->escapeHtml($title) ?>
85  </option>
86  <?php endforeach; ?>
87  </select>
88  </div>
89  </div>
90  <div class="actions-toolbar">
91  <div class="primary">
92  <button type="submit" class="primary action create">
93  <span><?= $block->escapeHtml(__('Create...')) ?></span>
94  </button>
95  </div>
96  <div class="secondary">
97  <a href="<?= $block->escapeUrl($block->getBackUrl()) ?>" class="action back">
98  <span><?= $block->escapeHtml(__('Back')) ?></span>
99  </a>
100  </div>
101  </div>
102  </fieldset>
103  </form>
104  <?php else: ?>
105  <div class="actions-toolbar">
106  <div class="secondary">
107  <a href="<?= $block->escapeUrl($block->getBackUrl()) ?>" class="action back">
108  <span><?= $block->escapeHtml(__('Back')) ?></span>
109  </a>
110  </div>
111  </div>
112  <?php endif; ?>
113 </div>
$title
Definition: default.phtml:14
$block setTitle( 'CMS Block Title') -> setIdentifier('fixture_block') ->setContent('< h1 >Fixture Block Title</h1 >< a href=" store url</a><p> Config value
Definition: block.php:9
__()
Definition: __.php:13
jquery extjs ext tree mage adminhtml form
Definition: tree.phtml:41
$block
Definition: block.php:8
$_count $_index $_prevOptionId if($block->getOrderOptions()|| $_item->getDescription()) foreach( $items as $_item)( $_item) ?><?php $attributes if( $_item->getOrderItem() ->getParentItem())($_prevOptionId !=$attributes['option_id'])</td >< td > & nbsp
Definition: renderer.phtml:33
$billingAgreements
if( $agreement->getMode()==\Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_MANUAL)() ?>" nameelseif ($agreement->getMode() == \Magento\CheckoutAgreements\Model\AgreementModeOptions::MODE_AUTO) () ?>" class endif
if(count( $billingAgreements) > 0)( 'pager') ?>< div classforeach( $billingAgreements as $item)(__( 'Reference ID')) ?>" class endforeach
$paymentMethods
$code
Definition: info.phtml:12