mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-26 16:34:46 +00:00
feat: E-commerce Refactor
- Created "Website Item" to handle website related information - Publishing Item new flow - Created "E Commerce Settings" - Removed Products Settings
This commit is contained in:
@@ -8,8 +8,8 @@ import frappe
|
||||
|
||||
class ProductFiltersBuilder:
|
||||
def __init__(self, item_group=None):
|
||||
if not item_group or item_group == "Products Settings":
|
||||
self.doc = frappe.get_doc("Products Settings")
|
||||
if not item_group or item_group == "E Commerce Settings":
|
||||
self.doc = frappe.get_doc("E Commerce Settings")
|
||||
else:
|
||||
self.doc = frappe.get_doc("Item Group", item_group)
|
||||
|
||||
|
||||
@@ -15,13 +15,13 @@ class ProductQuery:
|
||||
filters (TYPE): Description
|
||||
or_filters (list): Description
|
||||
page_length (Int): Length of page for the query
|
||||
settings (Document): Products Settings DocType
|
||||
settings (Document): E Commerce Settings DocType
|
||||
filters (list)
|
||||
or_filters (list)
|
||||
"""
|
||||
|
||||
def __init__(self):
|
||||
self.settings = frappe.get_doc("Products Settings")
|
||||
self.settings = frappe.get_doc("E Commerce Settings")
|
||||
self.cart_settings = frappe.get_doc("Shopping Cart Settings")
|
||||
self.page_length = self.settings.products_per_page or 20
|
||||
self.fields = ['name', 'item_name', 'item_code', 'website_image', 'variant_of', 'has_variants',
|
||||
|
||||
Reference in New Issue
Block a user