mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-22 06:29:20 +00:00
chore: Remove Home Page is Products and Sider fixes
- Removed `Home Page is Products` checkbox in E Comm Settings. Can be manually set in Website Settings - Removed hooks trigger to reset home page as products - Sider: duplicate color attribute, shift `return` to next line, over-indentation
This commit is contained in:
@@ -5,8 +5,6 @@
|
||||
"editable_grid": 1,
|
||||
"engine": "InnoDB",
|
||||
"field_order": [
|
||||
"home_page_is_products",
|
||||
"column_break_4",
|
||||
"products_per_page",
|
||||
"display_settings_section",
|
||||
"hide_variants",
|
||||
@@ -59,13 +57,6 @@
|
||||
"is_redisearch_loaded"
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"default": "0",
|
||||
"description": "If checked, the Home page will be the default Item Group for the website",
|
||||
"fieldname": "home_page_is_products",
|
||||
"fieldtype": "Check",
|
||||
"label": "Home Page is Products"
|
||||
},
|
||||
{
|
||||
"default": "6",
|
||||
"fieldname": "products_per_page",
|
||||
@@ -84,10 +75,6 @@
|
||||
"fieldtype": "Check",
|
||||
"label": "Hide Variants"
|
||||
},
|
||||
{
|
||||
"fieldname": "column_break_4",
|
||||
"fieldtype": "Column Break"
|
||||
},
|
||||
{
|
||||
"default": "0",
|
||||
"description": "The field filters will also work as categories in the <b>Shop by Category</b> page.",
|
||||
@@ -392,7 +379,7 @@
|
||||
"index_web_pages_for_search": 1,
|
||||
"issingle": 1,
|
||||
"links": [],
|
||||
"modified": "2021-07-15 16:50:50.087281",
|
||||
"modified": "2021-08-24 13:40:15.294696",
|
||||
"modified_by": "Administrator",
|
||||
"module": "E-commerce",
|
||||
"name": "E Commerce Settings",
|
||||
|
||||
@@ -18,11 +18,6 @@ class ECommerceSettings(Document):
|
||||
self.is_redisearch_loaded = is_search_module_loaded()
|
||||
|
||||
def validate(self):
|
||||
if self.home_page_is_products:
|
||||
frappe.db.set_value("Website Settings", None, "home_page", "products")
|
||||
elif frappe.db.get_single_value("Website Settings", "home_page") == 'products':
|
||||
frappe.db.set_value("Website Settings", None, "home_page", "home")
|
||||
|
||||
self.validate_field_filters()
|
||||
self.validate_attribute_filters()
|
||||
self.validate_checkout()
|
||||
@@ -164,9 +159,3 @@ def check_shopping_cart_enabled():
|
||||
|
||||
def show_attachments():
|
||||
return get_shopping_cart_settings().show_attachments
|
||||
|
||||
def home_page_is_products(doc, method):
|
||||
"""Called on saving Website Settings."""
|
||||
home_page_is_products = cint(frappe.db.get_single_value("E Commerce Settings", "home_page_is_products"))
|
||||
if home_page_is_products:
|
||||
doc.home_page = "products"
|
||||
Reference in New Issue
Block a user