[fix] [minor] display product image in shopping cart
This commit is contained in:
parent
16ec14f9ab
commit
6ec4b0c52a
@ -9,7 +9,6 @@ $(document).ready(function() {
|
|||||||
type: "POST",
|
type: "POST",
|
||||||
method: "selling.utils.cart.get_cart_quotation",
|
method: "selling.utils.cart.get_cart_quotation",
|
||||||
callback: function(r) {
|
callback: function(r) {
|
||||||
console.log(r);
|
|
||||||
$("#cart-container").removeClass("hide");
|
$("#cart-container").removeClass("hide");
|
||||||
$(".progress").remove();
|
$(".progress").remove();
|
||||||
if(r.exc) {
|
if(r.exc) {
|
||||||
@ -126,8 +125,8 @@ $.extend(erpnext.cart, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
render_item_row: function($cart_items, doc) {
|
render_item_row: function($cart_items, doc) {
|
||||||
doc.image_html = doc.image ?
|
doc.image_html = doc.website_image ?
|
||||||
'<div style="height: 120px; overflow: hidden;"><img src="' + doc.image + '" /></div>' :
|
'<div style="height: 120px; overflow: hidden;"><img src="' + doc.website_image + '" /></div>' :
|
||||||
'{% include "app/stock/doctype/item/templates/includes/product_missing_image.html" %}';
|
'{% include "app/stock/doctype/item/templates/includes/product_missing_image.html" %}';
|
||||||
|
|
||||||
if(doc.description === doc.item_name) doc.description = "";
|
if(doc.description === doc.item_name) doc.description = "";
|
||||||
|
@ -286,7 +286,7 @@ def apply_cart_settings(party=None, quotation=None):
|
|||||||
cart_settings = webnotes.get_obj("Shopping Cart Settings")
|
cart_settings = webnotes.get_obj("Shopping Cart Settings")
|
||||||
|
|
||||||
billing_territory = get_address_territory(quotation.doc.customer_address) or \
|
billing_territory = get_address_territory(quotation.doc.customer_address) or \
|
||||||
party.territory
|
party.territory or "All Territories"
|
||||||
|
|
||||||
set_price_list_and_rate(quotation, cart_settings, billing_territory)
|
set_price_list_and_rate(quotation, cart_settings, billing_territory)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user