diff --git a/erpnext/portal/doctype/products_settings/products_settings.py b/erpnext/portal/doctype/products_settings/products_settings.py index c1da3fed38..9a708924ae 100644 --- a/erpnext/portal/doctype/products_settings/products_settings.py +++ b/erpnext/portal/doctype/products_settings/products_settings.py @@ -17,7 +17,7 @@ class ProductsSettings(Document): self.validate_field_filters() self.validate_attribute_filters() - frappe.clear_document_cache("Product Settings") + frappe.clear_document_cache("Product Settings", "Product Settings") def validate_field_filters(self): if not (self.enable_field_filters and self.filter_fields): return diff --git a/erpnext/public/scss/shopping_cart.scss b/erpnext/public/scss/shopping_cart.scss index 5d3c41daee..ee30f53186 100644 --- a/erpnext/public/scss/shopping_cart.scss +++ b/erpnext/public/scss/shopping_cart.scss @@ -83,6 +83,10 @@ body.product-page { // text-align: left; // } // } + .card-img-container { + height: 210px; + width: 100%; + } .card-img { max-height: 210px; @@ -308,10 +312,6 @@ body.product-page { } } } - - svg { - display: none; - } } } diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index bff806d547..e4cbf41f83 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -98,6 +98,8 @@ class ItemGroup(NestedSet, WebsiteGenerator): context.field_filters = filter_engine.get_field_filters() context.attribute_filters = filter_engine.get_attribute_fitlers() + print(context.field_filters, context.attribute_filters) + context.update({ "parents": get_parent_item_groups(self.parent_item_group), "title": self.name diff --git a/erpnext/shopping_cart/filters.py b/erpnext/shopping_cart/filters.py index 6c63d8759b..e60364d92b 100644 --- a/erpnext/shopping_cart/filters.py +++ b/erpnext/shopping_cart/filters.py @@ -16,6 +16,7 @@ class ProductFiltersBuilder: def get_field_filters(self): filter_fields = [row.fieldname for row in self.doc.filter_fields] + print('FILTERS', self.doc.filter_fields) meta = frappe.get_meta('Item') fields = [df for df in meta.fields if df.fieldname in filter_fields] @@ -52,6 +53,7 @@ class ProductFiltersBuilder: def get_attribute_fitlers(self): attributes = [row.attribute for row in self.doc.filter_attributes] + print('ATTRIBUTES', attributes) attribute_docs = [ frappe.get_doc('Item Attribute', attribute) for attribute in attributes ] diff --git a/erpnext/templates/includes/macros.html b/erpnext/templates/includes/macros.html index 0adfbc9dfd..e6aef9ace0 100644 --- a/erpnext/templates/includes/macros.html +++ b/erpnext/templates/includes/macros.html @@ -89,7 +89,9 @@
{% if image %} - {{ title }} +
+ {{ title }} +
{% else %}
{{ frappe.utils.get_abbr(title) }} diff --git a/erpnext/www/all-products/index.py b/erpnext/www/all-products/index.py index fd6400f48c..0622270e05 100644 --- a/erpnext/www/all-products/index.py +++ b/erpnext/www/all-products/index.py @@ -12,6 +12,7 @@ def get_context(context): 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) + print(field_filters, attribute_filters) start = frappe.parse_json(frappe.form_dict.start) else: search = field_filters = attribute_filters = None @@ -29,6 +30,8 @@ def get_context(context): context.field_filters = filter_engine.get_field_filters() context.attribute_filters = filter_engine.get_attribute_fitlers() + print(context.field_filters, context.attribute_filters) + context.product_settings = product_settings context.body_class = "product-page" context.page_length = product_settings.products_per_page or 20