- Moved product query and filters engine to `product_data_engine` folder - Moved product grid, list, search, view to `product_ui` folder - Renamed `website_item_indexing.py` to `redisearch.py` - Render Terms and Conditions server side along with the rest of the Shopping cart. Don’t make another db call - Style changes to terms and conditions - Deleted unused `cart_terms.html` - Removed print statements
17 lines
548 B
Python
17 lines
548 B
Python
import frappe
|
|
from frappe.utils import cint
|
|
from erpnext.e_commerce.product_data_engine.filters import ProductFiltersBuilder
|
|
|
|
sitemap = 1
|
|
|
|
def get_context(context):
|
|
# Add homepage as parent
|
|
context.parents = [{"name": frappe._("Home"), "route":"/"}]
|
|
|
|
filter_engine = ProductFiltersBuilder()
|
|
context.field_filters = filter_engine.get_field_filters()
|
|
context.attribute_filters = filter_engine.get_attribute_filters()
|
|
|
|
context.page_length = cint(frappe.db.get_single_value('E Commerce Settings', 'products_per_page'))or 20
|
|
|
|
context.no_cache = 1 |