fix: Move get_product_filtrs_data to website item file
diff --git a/erpnext/e_commerce/doctype/website_item/website_item.py b/erpnext/e_commerce/doctype/website_item/website_item.py
index 5ced1be..f47b722 100644
--- a/erpnext/e_commerce/doctype/website_item/website_item.py
+++ b/erpnext/e_commerce/doctype/website_item/website_item.py
@@ -441,4 +441,38 @@
 			party_doctype = contact.links[0].link_doctype
 			party = contact.links[0].link_name
 
-	return True if party else False
\ No newline at end of file
+	return True if party else False
+
+@frappe.whitelist(allow_guest=True)
+def get_product_filter_data():
+	"""Get pre-rendered filtered products and discount filters on load."""
+	from erpnext.e_commerce.product_query import ProductQuery
+	from erpnext.e_commerce.filters import ProductFiltersBuilder
+	from erpnext.setup.doctype.item_group.item_group import get_child_groups
+
+	if frappe.form_dict:
+		search = frappe.form_dict.search
+		field_filters = frappe.parse_json(frappe.form_dict.field_filters)
+		attribute_filters = frappe.parse_json(frappe.form_dict.attribute_filters)
+		start = cint(frappe.parse_json(frappe.form_dict.start)) if frappe.form_dict.start else 0
+		item_group = frappe.form_dict.item_group
+	else:
+		search, attribute_filters, item_group = None, None, None
+		field_filters = {}
+		start = 0
+
+	sub_categories = []
+	if item_group:
+		field_filters['item_group'] = item_group
+		sub_categories = get_child_groups(item_group)
+
+	engine = ProductQuery()
+	items, discounts = engine.query(attribute_filters, field_filters, search_term=search, start=start)
+
+	# discount filter data
+	filters = {}
+	if discounts:
+		filter_engine = ProductFiltersBuilder()
+		filters["discount_filters"] = filter_engine.get_discount_filters(discounts)
+
+	return items or [], filters, engine.settings, sub_categories
\ No newline at end of file
diff --git a/erpnext/e_commerce/product_view.js b/erpnext/e_commerce/product_view.js
index 03fd31e..5fcd0a0 100644
--- a/erpnext/e_commerce/product_view.js
+++ b/erpnext/e_commerce/product_view.js
@@ -29,7 +29,7 @@
 		$('#list').prop('disabled', true);
 		$('#image-view').prop('disabled', true);
 		frappe.call({
-			method: 'erpnext.www.all-products.index.get_product_filter_data',
+			method: 'erpnext.e_commerce.doctype.website_item.website_item.get_product_filter_data',
 			args: args,
 			callback: function(result) {
 				if (!result.exc && result) {
diff --git a/erpnext/www/all-products/index.py b/erpnext/www/all-products/index.py
index a6c39db..a5476e4 100644
--- a/erpnext/www/all-products/index.py
+++ b/erpnext/www/all-products/index.py
@@ -1,8 +1,6 @@
 import frappe
 from frappe.utils import cint
-from erpnext.e_commerce.product_query import ProductQuery
 from erpnext.e_commerce.filters import ProductFiltersBuilder
-from erpnext.setup.doctype.item_group.item_group import get_child_groups
 
 sitemap = 1
 
@@ -16,34 +14,4 @@
 
 	context.page_length = cint(frappe.db.get_single_value('E Commerce Settings', 'products_per_page'))or 20
 
-	context.no_cache = 1
-
-@frappe.whitelist(allow_guest=True)
-def get_product_filter_data():
-	"""Get pre-rendered filtered products and discount filters on load."""
-	if frappe.form_dict:
-		search = frappe.form_dict.search
-		field_filters = frappe.parse_json(frappe.form_dict.field_filters)
-		attribute_filters = frappe.parse_json(frappe.form_dict.attribute_filters)
-		start = cint(frappe.parse_json(frappe.form_dict.start)) if frappe.form_dict.start else 0
-		item_group = frappe.form_dict.item_group
-	else:
-		search, attribute_filters, item_group = None, None, None
-		field_filters = {}
-		start = 0
-
-	sub_categories = []
-	if item_group:
-		field_filters['item_group'] = item_group
-		sub_categories = get_child_groups(item_group)
-
-	engine = ProductQuery()
-	items, discounts = engine.query(attribute_filters, field_filters, search_term=search, start=start)
-
-	# discount filter data
-	filters = {}
-	if discounts:
-		filter_engine = ProductFiltersBuilder()
-		filters["discount_filters"] = filter_engine.get_discount_filters(discounts)
-
-	return items or [], filters, engine.settings, sub_categories
\ No newline at end of file
+	context.no_cache = 1
\ No newline at end of file