Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

164 lines
4.8 KiB
HTML
Raw Normal View History

2016-01-01 17:23:12 +05:30
{% extends "templates/web.html" %}
{% block title %} {{ _("Shopping Cart") }} {% endblock %}
2014-10-21 16:16:30 +05:30
2021-01-20 17:52:54 +05:30
{% block header %}<h3 class="shopping-cart-header mt-2 mb-6">{{ _("Shopping Cart") }}</h1>{% endblock %}
2014-10-21 16:16:30 +05:30
<!--
2016-01-01 17:23:12 +05:30
{% block script %}
<script>{% include "templates/includes/cart.js" %}</script>
{% endblock %}
-->
2016-01-01 17:23:12 +05:30
2015-09-16 18:52:52 +05:30
{% block header_actions %}
{% endblock %}
2016-01-01 17:23:12 +05:30
{% block page_content %}
2015-09-16 18:52:52 +05:30
{% from "templates/includes/macros.html" import item_name_and_description %}
2021-01-20 17:52:54 +05:30
{% if doc.items %}
2016-05-02 11:43:44 +05:30
<div class="cart-container">
2021-01-20 17:52:54 +05:30
<div class="row m-0">
<div class="col-md-8 frappe-card p-5 mb-4">
2021-01-20 17:52:54 +05:30
<div>
<div id="cart-error" class="alert alert-danger" style="display: none;"></div>
<div class="cart-items-header">
{{ _('Items') }}
</div>
<table class="table mt-3 cart-table">
<thead>
<tr>
<th class="item-column">{{ _('Item') }}</th>
2021-01-20 17:52:54 +05:30
<th width="20%">{{ _('Quantity') }}</th>
{% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
<th width="20" class="text-right column-sm-view">{{ _('Subtotal') }}</th>
2021-01-20 17:52:54 +05:30
{% endif %}
<th width="10%" class="column-sm-view"></th>
2021-01-20 17:52:54 +05:30
</tr>
</thead>
<tbody class="cart-items">
{% include "templates/includes/cart/cart_items.html" %}
</tbody>
{% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
<tfoot class="cart-tax-items">
<tr>
<th></th>
<th class="text-left item-grand-total" colspan="1">
{{ _("Total") }}
</th>
<th class="text-left item-grand-total totals" colspan="3">
{{ doc.get_formatted("total") }}
</th>
</tr>
</tfoot>
2021-01-20 17:52:54 +05:30
{% endif %}
</table>
</div>
<div class="row mt-2">
<div class="col-3">
2021-01-20 17:52:54 +05:30
{% if cart_settings.enable_checkout %}
<a class="btn btn-primary-light font-md" href="/orders">
{{ _('Past Orders') }}
</a>
2021-01-20 17:52:54 +05:30
{% else %}
<a class="btn btn-primary-light font-md" href="/quotations">
{{ _('Past Quotes') }}
</a>
2021-01-20 17:52:54 +05:30
{% endif %}
</div>
<div class="col-9">
2021-01-20 17:52:54 +05:30
{% if doc.items %}
<div class="place-order-container">
<a class="btn btn-primary-light mr-2 font-md" href="/all-products">
{{ _('Continue Shopping') }}
</a>
2021-01-20 17:52:54 +05:30
</div>
{% endif %}
</div>
</div>
2016-05-02 11:43:44 +05:30
2021-01-20 17:52:54 +05:30
{% if doc.items %}
{% if doc.tc_name %}
<div class="terms-and-conditions-link">
<a href class="link-terms-and-conditions" data-terms-name="{{ doc.tc_name }}">
{{ _("Terms and Conditions") }}
</a>
<script>
frappe.ready(() => {
$('.link-terms-and-conditions').click((e) => {
e.preventDefault();
const $link = $(e.target);
const terms_name = $link.attr('data-terms-name');
show_terms_and_conditions(terms_name);
})
});
function show_terms_and_conditions(terms_name) {
frappe.call('erpnext.e_commerce.shopping_cart.cart.get_terms_and_conditions', { terms_name })
2021-01-20 17:52:54 +05:30
.then(r => {
frappe.msgprint({
title: terms_name,
message: r.message
});
});
}
</script>
</div>
{% endif %}
</div>
2021-01-20 17:52:54 +05:30
<div class="col-md-4">
<div class="cart-payment-addresses">
<!-- Apply Coupon Code -->
{% set show_coupon_code = cart_settings.show_apply_coupon_code_in_website and cart_settings.enable_checkout %}
{% if show_coupon_code == 1%}
<div class="mb-3">
<div class="row no-gutters">
<input type="text" class="txtcoupon form-control mr-3 w-50 font-md" placeholder="Enter Coupon Code" name="txtcouponcode" ></input>
<button class="btn btn-primary btn-sm bt-coupon font-md">{{ _("Apply Coupon Code") }}</button>
<input type="hidden" class="txtreferral_sales_partner font-md" placeholder="Enter Sales Partner" name="txtreferral_sales_partner" type="text"></input>
</div>
</div>
{% endif %}
{% if cart_settings.enable_checkout %}
{% include "templates/includes/cart/cart_payment_summary.html" %}
{% endif %}
2021-01-20 17:52:54 +05:30
{% include "templates/includes/cart/cart_address.html" %}
</div>
2016-05-02 11:43:44 +05:30
</div>
2021-01-20 17:52:54 +05:30
{% endif %}
</div>
</div>
2021-01-20 17:52:54 +05:30
{% else %}
<div class="cart-empty frappe-card">
<div class="cart-empty-state">
<img src="/assets/erpnext/images/ui-states/cart-empty-state.png" alt="Empty State">
</div>
<div class="cart-empty-message mt-4">{{ _('Your cart is Empty') }}</p>
{% if cart_settings.enable_checkout %}
<a class="btn btn-outline-primary" href="/orders">
{{ _('See past orders') }}
</a>
{% else %}
2021-01-20 17:52:54 +05:30
<a class="btn btn-outline-primary" href="/quotations">
{{ _('See past quotations') }}
</a>
2021-01-20 17:52:54 +05:30
{% endif %}
2014-10-21 16:16:30 +05:30
</div>
2021-01-20 17:52:54 +05:30
{% endif %}
2014-10-21 16:16:30 +05:30
{% endblock %}
2016-06-23 18:25:50 +05:30
{% block base_scripts %}
<!-- js should be loaded in body! -->
2021-05-07 14:53:42 +05:30
{{ include_script("frappe-web.bundle.js") }}
{{ include_script("controls.bundle.js") }}
{{ include_script("dialog.bundle.js") }}
2014-10-21 16:16:30 +05:30
{% endblock %}