/
body.php
121 lines (101 loc) · 4.41 KB
/
body.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Metaways Infosystems GmbH, 2012
* @copyright Aimeos (aimeos.org), 2015-2024
*/
$enc = $this->encoder();
?>
<?php if( isset( $this->standardBasket ) ) : ?>
<div class="section aimeos basket-standard" data-jsonurl="<?= $enc->attr( $this->link( 'client/jsonapi/url' ) ) ?>">
<div class="container-xxl">
<form method="POST" action="<?= $enc->attr( $this->link( 'client/html/basket/standard/url' ) ) ?>">
<?= $this->csrf()->formfield() ?>
<div class="row header">
<h2 class="col-12 col-sm-6"><?= $enc->html( $this->translate( 'client', 'Basket' ), $enc::TRUST ) ?></h2>
<div class="col-12 col-sm-6">
<div class="input-group basket-save">
<input class="form-control basket-name" type="text" maxlength="255"
placeholder="<?= $enc->attr( $this->translate( 'client', 'Basket name' ) ) ?>"
name="<?= $enc->attr( $this->formparam( 'b_name' ) ) ?>"
>
<button class="btn" type="submit"
formaction="<?= $enc->attr( $this->link( 'client/html/basket/standard/url', ['b_action' => 'save'] ) ) ?>">
<?= $enc->attr( $this->translate( 'client', 'Save' ) ) ?>
</button>
</div>
</div>
</div>
<div class="common-summary-detail">
<div class="header">
<h2><?= $enc->html( $this->translate( 'client', 'Details' ), $enc::TRUST ) ?></h2>
</div>
<div class="basket">
<?= $this->partial(
/** client/html/basket/standard/summary/detail
* Location of the detail partial template for the basket standard component
*
* To configure an alternative template for the detail partial, you
* have to configure its path relative to the template directory
* (usually templates/client/html/). It's then used to display the
* product detail block in the basket standard component.
*
* @param string Relative path to the detail partial
* @since 2017.01
*/
$this->config( 'client/html/basket/standard/summary/detail', 'common/summary/detail' ),
[
'summaryEnableModify' => true,
'summaryBasket' => $this->standardBasket,
'summaryErrorCodes' => $this->get( 'standardErrorCodes', [] )
]
) ?>
</div>
</div>
<div class="basket-standard-coupon">
<div class="header">
<h2><?= $enc->html( $this->translate( 'client', 'Coupon codes' ) ) ?></h2>
</div>
<div class="content">
<div class="input-group coupon-new">
<input class="form-control coupon-code" type="text" maxlength="255"
placeholder="<?= $enc->attr( $this->translate( 'client', 'Coupon codes' ) ) ?>"
name="<?= $enc->attr( $this->formparam( 'b_coupon' ) ) ?>"
><!--
--><button class="btn btn-primary" type="submit"><?= $enc->html( $this->translate( 'client', 'Apply' ) ) ?></button>
</div>
<?php if( !( $coupons = $this->standardBasket->getCoupons() )->isEmpty() ) : ?>
<div class="coupon-detail">
<p class="name"><?= $enc->html( $this->translate( 'client', 'Coupons' ) ) ?>:</p>
<ul class="attr-list">
<?php foreach( $coupons as $code => $products ) : $params = array( 'b_action' => 'coupon-delete', 'b_coupon' => $code ) ?>
<li class="attr-item">
<span class="coupon-code"><?= $enc->html( $code ) ?></span>
<a class="minibutton delete" href="<?= $enc->attr( $this->link( 'client/html/basket/standard/url', $params ) ) ?>"></a>
</li>
<?php endforeach ?>
</ul>
</div>
<?php endif ?>
</div>
</div>
<div class="button-group">
<?php if( isset( $this->standardBackUrl ) ) : ?>
<a class="btn btn-default btn-lg btn-back" href="<?= $enc->attr( $this->standardBackUrl ) ?>">
<?= $enc->html( $this->translate( 'client', 'Back' ), $enc::TRUST ) ?>
</a>
<?php endif ?>
<button class="btn btn-default btn-lg btn-update" type="submit">
<?= $enc->html( $this->translate( 'client', 'Update' ), $enc::TRUST ) ?>
</button>
<?php if( $this->get( 'standardCheckout', false ) === true ) : ?>
<a class="btn btn-primary btn-lg btn-action"
href="<?= $enc->attr( $this->link( 'client/html/checkout/standard/url' ) ) ?>">
<?= $enc->html( $this->translate( 'client', 'Checkout' ), $enc::TRUST ) ?>
</a>
<?php endif ?>
</div>
</form>
</div>
</div>
<?php endif ?>