fix: Mixin import issue, search error handling, shop-by-category slideshow
This commit is contained in:
parent
0c73f688e9
commit
24ba06c37b
@ -60,7 +60,8 @@ def create_website_items_index():
|
||||
idx_fields = frappe.db.get_single_value(
|
||||
'E Commerce Settings',
|
||||
'search_index_fields'
|
||||
).split(',')
|
||||
)
|
||||
idx_fields = idx_fields.split(',') if idx_fields else []
|
||||
|
||||
if 'web_item_name' in idx_fields:
|
||||
idx_fields.remove('web_item_name')
|
||||
@ -192,7 +193,8 @@ def get_fields_indexed():
|
||||
fields_to_index = frappe.db.get_single_value(
|
||||
'E Commerce Settings',
|
||||
'search_index_fields'
|
||||
).split(',')
|
||||
)
|
||||
fields_to_index = fields_to_index.split(',') if fields_to_index else []
|
||||
|
||||
mandatory_fields = ['name', 'web_item_name', 'route', 'thumbnail']
|
||||
fields_to_index = fields_to_index + mandatory_fields
|
||||
|
@ -486,7 +486,7 @@ body.product-page {
|
||||
font-weight: 500;
|
||||
display: none;
|
||||
|
||||
@include media-breakpoint-between(xs, md) {
|
||||
@media (max-width: 992px) {
|
||||
display: unset !important;
|
||||
}
|
||||
}
|
||||
@ -510,14 +510,14 @@ body.product-page {
|
||||
}
|
||||
|
||||
.column-sm-view {
|
||||
@include media-breakpoint-between(xs, md) {
|
||||
@media (max-width: 992px) {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item-column {
|
||||
width: 50%;
|
||||
@include media-breakpoint-between(xs, md) {
|
||||
@media (max-width: 992px) {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
@ -539,7 +539,7 @@ body.product-page {
|
||||
|
||||
.totals {
|
||||
padding-right: 4rem;
|
||||
@include media-breakpoint-between(xs, md) {
|
||||
@media (max-width: 992px) {
|
||||
padding-right: 1rem;
|
||||
}
|
||||
}
|
||||
|
@ -26,12 +26,12 @@ def get_slideshow(slideshow):
|
||||
slideshow = frappe.get_cached_doc("Website Slideshow", slideshow)
|
||||
slides = slideshow.get({"doctype": "Website Slideshow Item"})
|
||||
for index, slide in enumerate(slides, start=1):
|
||||
values[f"slide_{index + 1}_image"] = slide.image
|
||||
values[f"slide_{index + 1}_title"] = slide.heading
|
||||
values[f"slide_{index + 1}_subtitle"] = slide.description
|
||||
values[f"slide_{index + 1}_theme"] = slide.get("theme") or "Light"
|
||||
values[f"slide_{index + 1}_content_align"] = slide.get("content_align") or "Centre"
|
||||
values[f"slide_{index + 1}_primary_action"] = slide.url
|
||||
values[f"slide_{index}_image"] = slide.image
|
||||
values[f"slide_{index}_title"] = slide.heading
|
||||
values[f"slide_{index}_subtitle"] = slide.description
|
||||
values[f"slide_{index}_theme"] = slide.get("theme") or "Light"
|
||||
values[f"slide_{index}_content_align"] = slide.get("content_align") or "Centre"
|
||||
values[f"slide_{index}_primary_action"] = slide.url
|
||||
|
||||
return values
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user