blob: 2b7d9e35239e00bc9a8961222dcd5102ec2e505a [file] [log] [blame]
Rushabh Mehta51008f22016-01-01 17:23:12 +05301{% extends "templates/web.html" %}
2
Robert Kirschnerd162eb32017-03-23 12:18:24 +01003{% block title %} {{ _("Shopping Cart") }} {% endblock %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +05304
prssannab00eb1b2021-01-20 17:52:54 +05305{% block header %}<h3 class="shopping-cart-header mt-2 mb-6">{{ _("Shopping Cart") }}</h1>{% endblock %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +05306
Rushabh Mehta3d766862015-09-16 18:52:52 +05307{% block header_actions %}
Rushabh Mehta3d766862015-09-16 18:52:52 +05308{% endblock %}
9
Rushabh Mehta51008f22016-01-01 17:23:12 +053010{% block page_content %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053011
Rushabh Mehta3d766862015-09-16 18:52:52 +053012{% from "templates/includes/macros.html" import item_name_and_description %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053013
prssannab00eb1b2021-01-20 17:52:54 +053014{% if doc.items %}
Kanchan Chauhan239b3512016-05-02 11:43:44 +053015<div class="cart-container">
prssannab00eb1b2021-01-20 17:52:54 +053016 <div class="row m-0">
marination335a2372021-08-12 19:01:10 +053017 <!-- Left section -->
18 <div class="col-md-8">
19 <div class="frappe-card p-5 mb-4">
prssannab00eb1b2021-01-20 17:52:54 +053020 <div id="cart-error" class="alert alert-danger" style="display: none;"></div>
21 <div class="cart-items-header">
22 {{ _('Items') }}
23 </div>
24 <table class="table mt-3 cart-table">
25 <thead>
26 <tr>
marination53bb7a92021-05-27 18:53:11 +053027 <th class="item-column">{{ _('Item') }}</th>
prssannab00eb1b2021-01-20 17:52:54 +053028 <th width="20%">{{ _('Quantity') }}</th>
marination929a24e2021-07-15 20:09:02 +053029 {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
30 <th width="20" class="text-right column-sm-view">{{ _('Subtotal') }}</th>
prssannab00eb1b2021-01-20 17:52:54 +053031 {% endif %}
marination53bb7a92021-05-27 18:53:11 +053032 <th width="10%" class="column-sm-view"></th>
prssannab00eb1b2021-01-20 17:52:54 +053033 </tr>
34 </thead>
35 <tbody class="cart-items">
36 {% include "templates/includes/cart/cart_items.html" %}
37 </tbody>
marination929a24e2021-07-15 20:09:02 +053038
39 {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
40 <tfoot class="cart-tax-items">
Marica4096b142021-09-15 14:00:14 +053041 {% include "templates/includes/cart/cart_items_total.html" %}
marination929a24e2021-07-15 20:09:02 +053042 </tfoot>
prssannab00eb1b2021-01-20 17:52:54 +053043 {% endif %}
44 </table>
marination53bb7a92021-05-27 18:53:11 +053045
marination335a2372021-08-12 19:01:10 +053046 <div class="row mt-2">
47 <div class="col-3">
48 {% if cart_settings.enable_checkout %}
49 <a class="btn btn-primary-light font-md" href="/orders">
50 {{ _('Past Orders') }}
51 </a>
52 {% else %}
53 <a class="btn btn-primary-light font-md" href="/quotations">
54 {{ _('Past Quotes') }}
55 </a>
56 {% endif %}
prssannab00eb1b2021-01-20 17:52:54 +053057 </div>
marination335a2372021-08-12 19:01:10 +053058 <div class="col-9">
59 {% if doc.items %}
60 <div class="place-order-container">
61 <a class="btn btn-primary-light mr-2 font-md" href="/all-products">
62 {{ _('Continue Shopping') }}
63 </a>
64 </div>
65 {% endif %}
66 </div>
prssannab00eb1b2021-01-20 17:52:54 +053067 </div>
68 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +053069
marination335a2372021-08-12 19:01:10 +053070 <!-- Terms and Conditions -->
prssannab00eb1b2021-01-20 17:52:54 +053071 {% if doc.items %}
marination335a2372021-08-12 19:01:10 +053072 {% if doc.terms %}
73 <div class="t-and-c-container mt-4 frappe-card">
74 <h5>{{ _("Terms and Conditions") }}</h5>
75 <div class="t-and-c-terms mt-2">
76 {{ doc.terms }}
77 </div>
78 </div>
79 {% endif %}
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053080 </div>
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053081
marination335a2372021-08-12 19:01:10 +053082 <!-- Right section -->
prssannab00eb1b2021-01-20 17:52:54 +053083 <div class="col-md-4">
marination929a24e2021-07-15 20:09:02 +053084 <div class="cart-payment-addresses">
85 <!-- Apply Coupon Code -->
86 {% set show_coupon_code = cart_settings.show_apply_coupon_code_in_website and cart_settings.enable_checkout %}
87 {% if show_coupon_code == 1%}
88 <div class="mb-3">
89 <div class="row no-gutters">
90 <input type="text" class="txtcoupon form-control mr-3 w-50 font-md" placeholder="Enter Coupon Code" name="txtcouponcode" ></input>
91 <button class="btn btn-primary btn-sm bt-coupon font-md">{{ _("Apply Coupon Code") }}</button>
92 <input type="hidden" class="txtreferral_sales_partner font-md" placeholder="Enter Sales Partner" name="txtreferral_sales_partner" type="text"></input>
93 </div>
94 </div>
95 {% endif %}
96
marinationba52d7c2021-09-30 18:34:26 +053097 <div class="mb-3 frappe-card p-5 payment-summary">
98 {% include "templates/includes/cart/cart_payment_summary.html" %}
99 </div>
marination929a24e2021-07-15 20:09:02 +0530100
prssannab00eb1b2021-01-20 17:52:54 +0530101 {% include "templates/includes/cart/cart_address.html" %}
marination929a24e2021-07-15 20:09:02 +0530102 </div>
Kanchan Chauhan239b3512016-05-02 11:43:44 +0530103 </div>
prssannab00eb1b2021-01-20 17:52:54 +0530104 {% endif %}
Faris Ansari5f8b3582019-03-19 11:48:32 +0530105 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +0530106</div>
prssannab00eb1b2021-01-20 17:52:54 +0530107{% else %}
108<div class="cart-empty frappe-card">
109 <div class="cart-empty-state">
110 <img src="/assets/erpnext/images/ui-states/cart-empty-state.png" alt="Empty State">
111 </div>
112 <div class="cart-empty-message mt-4">{{ _('Your cart is Empty') }}</p>
113 {% if cart_settings.enable_checkout %}
Marica4096b142021-09-15 14:00:14 +0530114 <a class="btn btn-outline-primary" href="/orders" style="font-size: 16px;">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530115 {{ _('See past orders') }}
116 </a>
117 {% else %}
Marica4096b142021-09-15 14:00:14 +0530118 <a class="btn btn-outline-primary" href="/quotations" style="font-size: 16px;">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530119 {{ _('See past quotations') }}
120 </a>
prssannab00eb1b2021-01-20 17:52:54 +0530121 {% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530122</div>
prssannab00eb1b2021-01-20 17:52:54 +0530123{% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530124
Faris Ansari5f8b3582019-03-19 11:48:32 +0530125{% endblock %}
Rushabh Mehtaa3340622016-06-23 18:25:50 +0530126
Faris Ansari5f8b3582019-03-19 11:48:32 +0530127{% block base_scripts %}
128<!-- js should be loaded in body! -->
Faris Ansari464d8382021-05-07 14:53:42 +0530129{{ include_script("frappe-web.bundle.js") }}
130{{ include_script("controls.bundle.js") }}
131{{ include_script("dialog.bundle.js") }}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530132{% endblock %}