mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-02 16:13:22 +00:00
feat: Slashed Prices and Discount display
- Registered mrp and price after discounts - slashed price with discount in listing, item page and wishlist - removed redundant imports - renamed method to `get_web_item_qty_in_stock` to get Website Item stock - adjusted styles for resizing - made add to cart button full width on cards
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
{{ doc.website_content or '' }}
|
||||
|
||||
<!-- Reviews and Comments -->
|
||||
{% if shopping_cart.cart_settings.enable_reviews %}
|
||||
{% if shopping_cart.cart_settings.enable_reviews and not doc.has_variants %}
|
||||
{% include "templates/generators/item/item_reviews.html"%}
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
@@ -7,9 +7,21 @@
|
||||
<div class="col-md-12">
|
||||
<!-- Price and Availability -->
|
||||
{% if cart_settings.show_price and product_info.price %}
|
||||
{% set price_info = product_info.price %}
|
||||
|
||||
{% if price_info.formatted_mrp %}
|
||||
<small class="formatted-price">
|
||||
M.R.P.:
|
||||
<s>{{ price_info.formatted_mrp }}</s>
|
||||
</small>
|
||||
<small class="ml-2 formatted-price" style="color: #F47A7A; font-weight: 500;">
|
||||
{{ price_info.get("formatted_discount_percent") or price_info.get("formatted_discount_rate")}} OFF
|
||||
</small>
|
||||
{% endif %}
|
||||
|
||||
<div class="product-price">
|
||||
{{ product_info.price.formatted_price_sales_uom }}
|
||||
<small class="formatted-price">({{ product_info.price.formatted_price }} / {{ product_info.uom }})</small>
|
||||
{{ price_info.formatted_price_sales_uom }}
|
||||
<small class="formatted-price">({{ price_info.formatted_price }} / {{ product_info.uom }})</small>
|
||||
</div>
|
||||
{% else %}
|
||||
{{ _("UOM") }} : {{ product_info.uom }}
|
||||
|
||||
Reference in New Issue
Block a user