You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

82 lines
3.7 KiB

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="payment" name="Payment">
<!--- Section for selecting the delivery method, which is
only shown if there is more than one delivery option available. -->
<div t-if="deliveries" id="delivery_carrier">
<t t-set="delivery_nb" t-value="len(deliveries)"/>
<h3 t-if="delivery_nb &gt; 1" class="mb24">Choose a
delivery method
</h3>
<div t-if="delivery_nb &gt; 1"
class="card border-0" id="delivery_method">
<ul class="list-group">
<t t-foreach="deliveries" t-as="delivery">
<li class="list-group-item o_delivery_carrier_select">
<t t-call="website_sale_delivery.payment_delivery_methods"/>
</li>
</t>
</ul>
</div>
</div>
<!-- Section for selecting the payment method, which is shown
if there is a total amount to be paid. -->
<div class="col-12 col-xl order-xl-1 oe_cart">
<div class="oe_structure clearfix mt-3"
id="oe_structure_website_sale_payment_1"/>
<t t-if="website_sale_order.amount_total">
<div t-if="providers or tokens"
id="payment_method" class="mt-3">
<h3 class="mb24">Pay with</h3>
<t t-call="payment.checkout">
<t t-set="footer_template_id"
t-value="'website_sale.payment_footer'"/>
<t t-set="submit_button_label">Pay
Now
</t>
</t>
</div>
<!-- If there are payment providers available, the user is
presented with the option to choose a payment method.
Otherwise, a message is displayed saying that no suitable
payment option could be found. -->
<div t-else="" class="alert alert-warning">
<strong>No suitable payment option could be
found.
</strong>
<br/>
If you believe that it is an error, please
contact the website administrator.
</div>
</t>
<div t-if="not providers" class="mt-2">
<a role="button" class="btn-link"
groups="base.group_system"
t-attf-href="/web#action=#{payment_action_id}">
<i class="fa fa-arrow-right"/>
Add payment providers
</a>
</div>
<div class="js_payment mt-3"
t-if="not website_sale_order.amount_total"
id="payment_method"
name="o_website_sale_free_cart">
<form target="_self"
action="/shop/payment/validate"
method="post">
<input type="hidden" name="csrf_token"
t-att-value="request.csrf_token()"
t-nocache="The csrf token must always be up to date."/>
<!-- If there is no amount to be paid (i.e., the cart is free),
a confirmation button is displayed instead of the payment methods section. -->
<t t-call="website_sale.payment_footer">
<t t-set="submit_button_label">Confirm
Order
</t>
</t>
</form>
</div>
</div>
</template>
</odoo>