blob: bb8ba3b24e086d5f2dd2d4b09f47d1a005a134ae [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
Faris Ansari5f8b3582019-03-19 11:48:32 +05307<!--
Rushabh Mehta51008f22016-01-01 17:23:12 +05308{% block script %}
9<script>{% include "templates/includes/cart.js" %}</script>
10{% endblock %}
Faris Ansari5f8b3582019-03-19 11:48:32 +053011-->
Rushabh Mehta51008f22016-01-01 17:23:12 +053012
Rushabh Mehta3d766862015-09-16 18:52:52 +053013
14{% block header_actions %}
Rushabh Mehta3d766862015-09-16 18:52:52 +053015{% endblock %}
16
Rushabh Mehta51008f22016-01-01 17:23:12 +053017{% block page_content %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053018
Rushabh Mehta3d766862015-09-16 18:52:52 +053019{% from "templates/includes/macros.html" import item_name_and_description %}
Rushabh Mehta156ce602015-09-11 18:49:59 +053020
prssannab00eb1b2021-01-20 17:52:54 +053021{% if doc.items %}
Kanchan Chauhan239b3512016-05-02 11:43:44 +053022<div class="cart-container">
prssannab00eb1b2021-01-20 17:52:54 +053023 <div class="row m-0">
marination335a2372021-08-12 19:01:10 +053024 <!-- Left section -->
25 <div class="col-md-8">
26 <div class="frappe-card p-5 mb-4">
prssannab00eb1b2021-01-20 17:52:54 +053027 <div id="cart-error" class="alert alert-danger" style="display: none;"></div>
28 <div class="cart-items-header">
29 {{ _('Items') }}
30 </div>
31 <table class="table mt-3 cart-table">
32 <thead>
33 <tr>
marination53bb7a92021-05-27 18:53:11 +053034 <th class="item-column">{{ _('Item') }}</th>
prssannab00eb1b2021-01-20 17:52:54 +053035 <th width="20%">{{ _('Quantity') }}</th>
marination929a24e2021-07-15 20:09:02 +053036 {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
37 <th width="20" class="text-right column-sm-view">{{ _('Subtotal') }}</th>
prssannab00eb1b2021-01-20 17:52:54 +053038 {% endif %}
marination53bb7a92021-05-27 18:53:11 +053039 <th width="10%" class="column-sm-view"></th>
prssannab00eb1b2021-01-20 17:52:54 +053040 </tr>
41 </thead>
42 <tbody class="cart-items">
43 {% include "templates/includes/cart/cart_items.html" %}
44 </tbody>
marination929a24e2021-07-15 20:09:02 +053045
46 {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
47 <tfoot class="cart-tax-items">
48 <tr>
49 <th></th>
50 <th class="text-left item-grand-total" colspan="1">
51 {{ _("Total") }}
52 </th>
53 <th class="text-left item-grand-total totals" colspan="3">
54 {{ doc.get_formatted("total") }}
55 </th>
56 </tr>
57 </tfoot>
prssannab00eb1b2021-01-20 17:52:54 +053058 {% endif %}
59 </table>
marination53bb7a92021-05-27 18:53:11 +053060
marination335a2372021-08-12 19:01:10 +053061 <div class="row mt-2">
62 <div class="col-3">
63 {% if cart_settings.enable_checkout %}
64 <a class="btn btn-primary-light font-md" href="/orders">
65 {{ _('Past Orders') }}
66 </a>
67 {% else %}
68 <a class="btn btn-primary-light font-md" href="/quotations">
69 {{ _('Past Quotes') }}
70 </a>
71 {% endif %}
prssannab00eb1b2021-01-20 17:52:54 +053072 </div>
marination335a2372021-08-12 19:01:10 +053073 <div class="col-9">
74 {% if doc.items %}
75 <div class="place-order-container">
76 <a class="btn btn-primary-light mr-2 font-md" href="/all-products">
77 {{ _('Continue Shopping') }}
78 </a>
79 </div>
80 {% endif %}
81 </div>
prssannab00eb1b2021-01-20 17:52:54 +053082 </div>
83 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +053084
marination335a2372021-08-12 19:01:10 +053085 <!-- Terms and Conditions -->
prssannab00eb1b2021-01-20 17:52:54 +053086 {% if doc.items %}
marination335a2372021-08-12 19:01:10 +053087 {% if doc.terms %}
88 <div class="t-and-c-container mt-4 frappe-card">
89 <h5>{{ _("Terms and Conditions") }}</h5>
90 <div class="t-and-c-terms mt-2">
91 {{ doc.terms }}
92 </div>
93 </div>
94 {% endif %}
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053095 </div>
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053096
marination335a2372021-08-12 19:01:10 +053097 <!-- Right section -->
prssannab00eb1b2021-01-20 17:52:54 +053098 <div class="col-md-4">
marination929a24e2021-07-15 20:09:02 +053099 <div class="cart-payment-addresses">
100 <!-- Apply Coupon Code -->
101 {% set show_coupon_code = cart_settings.show_apply_coupon_code_in_website and cart_settings.enable_checkout %}
102 {% if show_coupon_code == 1%}
103 <div class="mb-3">
104 <div class="row no-gutters">
105 <input type="text" class="txtcoupon form-control mr-3 w-50 font-md" placeholder="Enter Coupon Code" name="txtcouponcode" ></input>
106 <button class="btn btn-primary btn-sm bt-coupon font-md">{{ _("Apply Coupon Code") }}</button>
107 <input type="hidden" class="txtreferral_sales_partner font-md" placeholder="Enter Sales Partner" name="txtreferral_sales_partner" type="text"></input>
108 </div>
109 </div>
110 {% endif %}
111
112 {% if cart_settings.enable_checkout %}
113 {% include "templates/includes/cart/cart_payment_summary.html" %}
114 {% endif %}
115
prssannab00eb1b2021-01-20 17:52:54 +0530116 {% include "templates/includes/cart/cart_address.html" %}
marination929a24e2021-07-15 20:09:02 +0530117 </div>
Kanchan Chauhan239b3512016-05-02 11:43:44 +0530118 </div>
prssannab00eb1b2021-01-20 17:52:54 +0530119 {% endif %}
Faris Ansari5f8b3582019-03-19 11:48:32 +0530120 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +0530121</div>
prssannab00eb1b2021-01-20 17:52:54 +0530122{% else %}
123<div class="cart-empty frappe-card">
124 <div class="cart-empty-state">
125 <img src="/assets/erpnext/images/ui-states/cart-empty-state.png" alt="Empty State">
126 </div>
127 <div class="cart-empty-message mt-4">{{ _('Your cart is Empty') }}</p>
128 {% if cart_settings.enable_checkout %}
129 <a class="btn btn-outline-primary" href="/orders">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530130 {{ _('See past orders') }}
131 </a>
132 {% else %}
prssannab00eb1b2021-01-20 17:52:54 +0530133 <a class="btn btn-outline-primary" href="/quotations">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530134 {{ _('See past quotations') }}
135 </a>
prssannab00eb1b2021-01-20 17:52:54 +0530136 {% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530137</div>
prssannab00eb1b2021-01-20 17:52:54 +0530138{% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530139
Faris Ansari5f8b3582019-03-19 11:48:32 +0530140{% endblock %}
Rushabh Mehtaa3340622016-06-23 18:25:50 +0530141
Faris Ansari5f8b3582019-03-19 11:48:32 +0530142{% block base_scripts %}
143<!-- js should be loaded in body! -->
Faris Ansari464d8382021-05-07 14:53:42 +0530144{{ include_script("frappe-web.bundle.js") }}
145{{ include_script("controls.bundle.js") }}
146{{ include_script("dialog.bundle.js") }}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530147{% endblock %}