blob: 6eb7e6a9390e7b7c262acc93bd0b51733d693424 [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">
Marica4096b142021-09-15 14:00:14 +053048 {% include "templates/includes/cart/cart_items_total.html" %}
marination929a24e2021-07-15 20:09:02 +053049 </tfoot>
prssannab00eb1b2021-01-20 17:52:54 +053050 {% endif %}
51 </table>
marination53bb7a92021-05-27 18:53:11 +053052
marination335a2372021-08-12 19:01:10 +053053 <div class="row mt-2">
54 <div class="col-3">
55 {% if cart_settings.enable_checkout %}
56 <a class="btn btn-primary-light font-md" href="/orders">
57 {{ _('Past Orders') }}
58 </a>
59 {% else %}
60 <a class="btn btn-primary-light font-md" href="/quotations">
61 {{ _('Past Quotes') }}
62 </a>
63 {% endif %}
prssannab00eb1b2021-01-20 17:52:54 +053064 </div>
marination335a2372021-08-12 19:01:10 +053065 <div class="col-9">
66 {% if doc.items %}
67 <div class="place-order-container">
68 <a class="btn btn-primary-light mr-2 font-md" href="/all-products">
69 {{ _('Continue Shopping') }}
70 </a>
71 </div>
72 {% endif %}
73 </div>
prssannab00eb1b2021-01-20 17:52:54 +053074 </div>
75 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +053076
marination335a2372021-08-12 19:01:10 +053077 <!-- Terms and Conditions -->
prssannab00eb1b2021-01-20 17:52:54 +053078 {% if doc.items %}
marination335a2372021-08-12 19:01:10 +053079 {% if doc.terms %}
80 <div class="t-and-c-container mt-4 frappe-card">
81 <h5>{{ _("Terms and Conditions") }}</h5>
82 <div class="t-and-c-terms mt-2">
83 {{ doc.terms }}
84 </div>
85 </div>
86 {% endif %}
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053087 </div>
Vishal Dhayagude24e79b12020-04-07 12:18:47 +053088
marination335a2372021-08-12 19:01:10 +053089 <!-- Right section -->
prssannab00eb1b2021-01-20 17:52:54 +053090 <div class="col-md-4">
marination929a24e2021-07-15 20:09:02 +053091 <div class="cart-payment-addresses">
92 <!-- Apply Coupon Code -->
93 {% set show_coupon_code = cart_settings.show_apply_coupon_code_in_website and cart_settings.enable_checkout %}
94 {% if show_coupon_code == 1%}
95 <div class="mb-3">
96 <div class="row no-gutters">
97 <input type="text" class="txtcoupon form-control mr-3 w-50 font-md" placeholder="Enter Coupon Code" name="txtcouponcode" ></input>
98 <button class="btn btn-primary btn-sm bt-coupon font-md">{{ _("Apply Coupon Code") }}</button>
99 <input type="hidden" class="txtreferral_sales_partner font-md" placeholder="Enter Sales Partner" name="txtreferral_sales_partner" type="text"></input>
100 </div>
101 </div>
102 {% endif %}
103
marinationba52d7c2021-09-30 18:34:26 +0530104 <div class="mb-3 frappe-card p-5 payment-summary">
105 {% include "templates/includes/cart/cart_payment_summary.html" %}
106 </div>
marination929a24e2021-07-15 20:09:02 +0530107
prssannab00eb1b2021-01-20 17:52:54 +0530108 {% include "templates/includes/cart/cart_address.html" %}
marination929a24e2021-07-15 20:09:02 +0530109 </div>
Kanchan Chauhan239b3512016-05-02 11:43:44 +0530110 </div>
prssannab00eb1b2021-01-20 17:52:54 +0530111 {% endif %}
Faris Ansari5f8b3582019-03-19 11:48:32 +0530112 </div>
Faris Ansari5f8b3582019-03-19 11:48:32 +0530113</div>
prssannab00eb1b2021-01-20 17:52:54 +0530114{% else %}
115<div class="cart-empty frappe-card">
116 <div class="cart-empty-state">
117 <img src="/assets/erpnext/images/ui-states/cart-empty-state.png" alt="Empty State">
118 </div>
119 <div class="cart-empty-message mt-4">{{ _('Your cart is Empty') }}</p>
120 {% if cart_settings.enable_checkout %}
Marica4096b142021-09-15 14:00:14 +0530121 <a class="btn btn-outline-primary" href="/orders" style="font-size: 16px;">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530122 {{ _('See past orders') }}
123 </a>
124 {% else %}
Marica4096b142021-09-15 14:00:14 +0530125 <a class="btn btn-outline-primary" href="/quotations" style="font-size: 16px;">
Faris Ansari5f8b3582019-03-19 11:48:32 +0530126 {{ _('See past quotations') }}
127 </a>
prssannab00eb1b2021-01-20 17:52:54 +0530128 {% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530129</div>
prssannab00eb1b2021-01-20 17:52:54 +0530130{% endif %}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530131
Faris Ansari5f8b3582019-03-19 11:48:32 +0530132{% endblock %}
Rushabh Mehtaa3340622016-06-23 18:25:50 +0530133
Faris Ansari5f8b3582019-03-19 11:48:32 +0530134{% block base_scripts %}
135<!-- js should be loaded in body! -->
Faris Ansari464d8382021-05-07 14:53:42 +0530136{{ include_script("frappe-web.bundle.js") }}
137{{ include_script("controls.bundle.js") }}
138{{ include_script("dialog.bundle.js") }}
Rushabh Mehta3daa49a2014-10-21 16:16:30 +0530139{% endblock %}