fix: broken image style
diff --git a/erpnext/portal/doctype/products_settings/products_settings.py b/erpnext/portal/doctype/products_settings/products_settings.py
index c1da3fe..9a70892 100644
--- a/erpnext/portal/doctype/products_settings/products_settings.py
+++ b/erpnext/portal/doctype/products_settings/products_settings.py
@@ -17,7 +17,7 @@
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 7bce6ab..46bb72b 100644
--- a/erpnext/public/scss/shopping_cart.scss
+++ b/erpnext/public/scss/shopping_cart.scss
@@ -83,6 +83,10 @@
// text-align: left;
// }
// }
+ .card-img-container {
+ height: 210px;
+ width: 100%;
+ }
.card-img {
max-height: 210px;
@@ -308,10 +312,6 @@
}
}
}
-
- svg {
- display: none;
- }
}
}
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index bff806d..e4cbf41 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -98,6 +98,8 @@
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 6c63d87..e60364d 100644
--- a/erpnext/shopping_cart/filters.py
+++ b/erpnext/shopping_cart/filters.py
@@ -16,6 +16,7 @@
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 @@
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 0adfbc9..e6aef9a 100644
--- a/erpnext/templates/includes/macros.html
+++ b/erpnext/templates/includes/macros.html
@@ -89,7 +89,9 @@
<div class="col-sm-{{ col_size }} item-card">
<div class="card {{ align_items_class }}">
{% if image %}
- <img class="card-img" src="{{ image }}" alt="{{ title }}">
+ <div class="card-img-container">
+ <img class="card-img" src="{{ image }}" alt="{{ title }}">
+ </div>
{% else %}
<div class="card-img-top no-image">
{{ frappe.utils.get_abbr(title) }}
diff --git a/erpnext/www/all-products/index.py b/erpnext/www/all-products/index.py
index fd6400f..0622270 100644
--- a/erpnext/www/all-products/index.py
+++ b/erpnext/www/all-products/index.py
@@ -12,6 +12,7 @@
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 @@
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