feat: Cart minor UI/UX Refresh
- Added Setting to show or hide price if checkout is disabled
- Show Web Item name in cart instead of Desk Item name
- Cart minor UI Refresh: added images in cart
- Cart minor UI Refresh: repositioned remove button and redesigned
- Cart minor UI Refresh: Payment Summary section
- Cart minor UI Refresh: Disable input on free item
- Cart minor UI Refresh: Add address button in cards
- New file for cart payment summary UI with coupon code (old)
diff --git a/erpnext/templates/pages/cart.html b/erpnext/templates/pages/cart.html
index 92deb14..05db77a 100644
--- a/erpnext/templates/pages/cart.html
+++ b/erpnext/templates/pages/cart.html
@@ -32,8 +32,8 @@
<tr>
<th class="item-column">{{ _('Item') }}</th>
<th width="20%">{{ _('Quantity') }}</th>
- {% if cart_settings.enable_checkout %}
- <th width="20" class="text-right column-sm-view">{{ _('Subtotal') }}</th>
+ {% if cart_settings.enable_checkout or cart_settings.show_price_in_quotation %}
+ <th width="20" class="text-right column-sm-view">{{ _('Subtotal') }}</th>
{% endif %}
<th width="10%" class="column-sm-view"></th>
</tr>
@@ -41,10 +41,19 @@
<tbody class="cart-items">
{% include "templates/includes/cart/cart_items.html" %}
</tbody>
- {% if cart_settings.enable_checkout %}
- <tfoot class="cart-tax-items">
- {% include "templates/includes/order/order_taxes.html" %}
- </tfoot>
+
+ {% 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>
{% endif %}
</table>
</div>
@@ -52,12 +61,12 @@
<div class="row mt-2">
<div class="col-3">
{% if cart_settings.enable_checkout %}
- <a class="btn btn-outline-primary font-md" href="/orders">
+ <a class="btn btn-primary-light font-md" href="/orders">
{{ _('Past Orders') }}
</a>
{% else %}
- <a class="btn btn-outline-primary font-md" href="/quotations">
- {{ _('See past quotations') }}
+ <a class="btn btn-primary-light font-md" href="/quotations">
+ {{ _('Past Quotes') }}
</a>
{% endif %}
</div>
@@ -65,17 +74,8 @@
{% if doc.items %}
<div class="place-order-container">
<a class="btn btn-primary-light mr-2 font-md" href="/all-products">
- {{ _('Back to Shop') }}
+ {{ _('Continue Shopping') }}
</a>
- {% if cart_settings.enable_checkout %}
- <button class="btn btn-primary btn-place-order font-md" type="button">
- {{ _('Place Order') }}
- </button>
- {% else %}
- <button class="btn btn-primary btn-request-for-quotation font-md" type="button">
- {{ _('Request for Quotation') }}
- </button>
- {% endif %}
</div>
{% endif %}
</div>
@@ -112,9 +112,25 @@
</div>
<div class="col-md-4">
- <div class="cart-addresses">
+ <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 %}
+
{% include "templates/includes/cart/cart_address.html" %}
- </div>
+ </div>
</div>
{% endif %}
</div>