diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 5d3ef78f1c8..39172d7d11b 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -82,7 +82,7 @@ def get_product_list_for_group(product_group=None, start=0, limit=10, search=Non # base query query = """select I.name, I.item_name, I.item_code, I.route, I.image, I.website_image, I.thumbnail, I.item_group, - I.description, I.web_long_description as website_description, + I.description, I.web_long_description as website_description, I.is_stock_item, case when (S.actual_qty - S.reserved_qty) > 0 then 1 else 0 end as in_stock from `tabItem` I left join tabBin S on I.item_code = S.item_code and I.website_warehouse = S.warehouse diff --git a/erpnext/shopping_cart/product_info.py b/erpnext/shopping_cart/product_info.py index 8015c4818f5..6f9c8acf170 100644 --- a/erpnext/shopping_cart/product_info.py +++ b/erpnext/shopping_cart/product_info.py @@ -30,10 +30,10 @@ def get_product_info_for_website(item_code): product_info = { "price": price, "stock_qty": stock_status.stock_qty, - "in_stock": stock_status.in_stock, + "in_stock": stock_status.in_stock if stock_status.is_stock_item else 1, "qty": 0, "uom": frappe.db.get_value("Item", item_code, "stock_uom"), - "show_stock_qty": show_quantity_in_website() + "show_stock_qty": show_quantity_in_website() if stock_status.is_stock_item else 0 } if product_info["price"]: diff --git a/erpnext/templates/includes/product_page.js b/erpnext/templates/includes/product_page.js index 93dadaa589e..9f9d6ac412a 100644 --- a/erpnext/templates/includes/product_page.js +++ b/erpnext/templates/includes/product_page.js @@ -64,7 +64,7 @@ frappe.ready(function() { // then chose the closest available one var attribute = $(this).attr("data-attribute"); - var attribute_value = $(this).val() + var attribute_value = $(this).val(); var item_code = find_closest_match(attribute, attribute_value); if (!item_code) { diff --git a/erpnext/templates/includes/products_as_grid.html b/erpnext/templates/includes/products_as_grid.html index b2437d3393f..4a9692aff62 100644 --- a/erpnext/templates/includes/products_as_grid.html +++ b/erpnext/templates/includes/products_as_grid.html @@ -5,7 +5,7 @@