45f64bd930
- Added bg (variable) to pages, card space separation visible - Removed `show brand line` in settings, shown by default - Re-arranged settings by importance - View toggling primary colour is grey - Only populate recent searches on successful search - Hit only one server side api, once while searching - List view primary button float right - Discounts takes upper limit eg. 10% and below - Navbar icons only wiggle on qty increase in cart/wishlist - Pay button in SO portal - Remove bottom white space below item full page image, min-height fits to content - List view vertical space between heading and item code - Empty offer subtitle handled
18 lines
585 B
Python
18 lines
585 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.body_class = "product-page"
|
|
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 |