iHello
May 15, 2016, 1:44am
#1
The “product search” in website don’t work with “Item Code”.
I search a product with “Item Name” it works.
But when i use the “Item Code” it don’t work.
iHello
May 15, 2016, 1:50am
#2
I search a product with “Description” ,it seams also work.
iHello
May 15, 2016, 2:17am
#3
I found a small fix:
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, nowdate, cint
from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html
from erpnext.shopping_cart.product_info import set_product_info_for_website
no_cache = 1
no_sitemap = 1
def get_context(context):
context.show_search = True
@frappe.whitelist(allow_guest=True)
def get_product_list(search=None, start=0, limit=12):
# limit = 12 because we show 12 items in the grid view
# base query
This file has been truncated. show original
Line 30, add item_code, and change to
or name like %(search)s
or item_code like %(search)s)"""
1 Like
Hmmm, this is actually as much as I know is editable from doctype editor
rmehta
May 16, 2016, 6:18am
#5
@iHello send a pull-request
@ramielian not sure search fields are considered here
Wouldn’t the index option also include it?