mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-06 13:49:13 +00:00
fix: Sider and Patches
- Sider fixes - Deleted patches that worked as per old schema - Cleared instances of web fields linked to Item master
This commit is contained in:
@@ -203,7 +203,7 @@ class WebsiteItem(WebsiteGenerator):
|
|||||||
# load variants
|
# load variants
|
||||||
# also used in set_attribute_context
|
# also used in set_attribute_context
|
||||||
context.variants = frappe.get_all("Item",
|
context.variants = frappe.get_all("Item",
|
||||||
filters={"variant_of": self.name, "show_variant_in_website": 1},
|
filters={"variant_of": self.name, "published_in_website": 1},
|
||||||
order_by="name asc")
|
order_by="name asc")
|
||||||
|
|
||||||
variant = frappe.form_dict.variant
|
variant = frappe.form_dict.variant
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ erpnext.ProductGrid = class {
|
|||||||
html += me.get_image_html(item, title);
|
html += me.get_image_html(item, title);
|
||||||
html += me.get_card_body_html(item, title, me.settings);
|
html += me.get_card_body_html(item, title, me.settings);
|
||||||
html += `</div></div>`;
|
html += `</div></div>`;
|
||||||
})
|
});
|
||||||
|
|
||||||
let $product_wrapper = this.products_section;
|
let $product_wrapper = this.products_section;
|
||||||
$product_wrapper.append(html);
|
$product_wrapper.append(html);
|
||||||
@@ -85,11 +85,11 @@ erpnext.ProductGrid = class {
|
|||||||
<div class="product-title">
|
<div class="product-title">
|
||||||
${ title || '' }
|
${ title || '' }
|
||||||
`;
|
`;
|
||||||
if (item.in_stock) {
|
if (item.in_stock && settings.show_stock_availability) {
|
||||||
title_html += `<span class="indicator ${ item.in_stock } card-indicator"></span>`;
|
title_html += `<span class="indicator ${ item.in_stock } card-indicator"></span>`;
|
||||||
}
|
}
|
||||||
title_html += `</div></a>`;
|
title_html += `</div></a>`;
|
||||||
return title_html
|
return title_html;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_wishlist_icon(item) {
|
get_wishlist_icon(item) {
|
||||||
@@ -145,4 +145,4 @@ erpnext.ProductGrid = class {
|
|||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
@@ -27,7 +27,7 @@ erpnext.ProductList = class {
|
|||||||
html += me.get_image_html(item, title);
|
html += me.get_image_html(item, title);
|
||||||
html += me.get_row_body_html(item, title, me.settings);
|
html += me.get_row_body_html(item, title, me.settings);
|
||||||
html += `</div>`;
|
html += `</div>`;
|
||||||
})
|
});
|
||||||
|
|
||||||
let $product_wrapper = this.products_section;
|
let $product_wrapper = this.products_section;
|
||||||
$product_wrapper.append(html);
|
$product_wrapper.append(html);
|
||||||
@@ -74,7 +74,7 @@ erpnext.ProductList = class {
|
|||||||
</a>
|
</a>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
if (item.in_stock) {
|
if (item.in_stock && settings.show_stock_availability) {
|
||||||
title_html += `<span class="indicator ${ item.in_stock } card-indicator"></span>`;
|
title_html += `<span class="indicator ${ item.in_stock } card-indicator"></span>`;
|
||||||
}
|
}
|
||||||
title_html += `</div>`;
|
title_html += `</div>`;
|
||||||
@@ -92,7 +92,7 @@ erpnext.ProductList = class {
|
|||||||
return title_html;
|
return title_html;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_item_details(item, settings) {
|
get_item_details(item) {
|
||||||
let details = `
|
let details = `
|
||||||
<p class="product-code">
|
<p class="product-code">
|
||||||
Item Code : ${ item.item_code }
|
Item Code : ${ item.item_code }
|
||||||
@@ -155,4 +155,4 @@ erpnext.ProductList = class {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
};
|
||||||
@@ -109,7 +109,7 @@ erpnext.ProductView = class {
|
|||||||
attribute_filters: attribute_filters,
|
attribute_filters: attribute_filters,
|
||||||
item_group: this.item_group,
|
item_group: this.item_group,
|
||||||
start: filters.start || null
|
start: filters.start || null
|
||||||
}
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
add_paging_section(settings) {
|
add_paging_section(settings) {
|
||||||
@@ -171,7 +171,7 @@ erpnext.ProductView = class {
|
|||||||
|
|
||||||
$("#products-grid-area").addClass("hidden");
|
$("#products-grid-area").addClass("hidden");
|
||||||
$("#products-list-area").removeClass("hidden");
|
$("#products-list-area").removeClass("hidden");
|
||||||
})
|
});
|
||||||
|
|
||||||
$("#image-view").click(function() {
|
$("#image-view").click(function() {
|
||||||
let $btn = $(this);
|
let $btn = $(this);
|
||||||
@@ -262,10 +262,10 @@ erpnext.ProductView = class {
|
|||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
`;
|
`;
|
||||||
})
|
});
|
||||||
sub_group_html += `</div>`;
|
sub_group_html += `</div>`;
|
||||||
|
|
||||||
$("#product-listing").prepend(sub_group_html);
|
$("#product-listing").prepend(sub_group_html);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
@@ -149,7 +149,6 @@ def create_item_code(amazon_item_json, sku):
|
|||||||
item.description = amazon_item_json.Product.AttributeSets.ItemAttributes.Title
|
item.description = amazon_item_json.Product.AttributeSets.ItemAttributes.Title
|
||||||
item.brand = new_brand
|
item.brand = new_brand
|
||||||
item.manufacturer = new_manufacturer
|
item.manufacturer = new_manufacturer
|
||||||
item.web_long_description = amazon_item_json.Product.AttributeSets.ItemAttributes.Title
|
|
||||||
|
|
||||||
item.image = amazon_item_json.Product.AttributeSets.ItemAttributes.SmallImage.URL
|
item.image = amazon_item_json.Product.AttributeSets.ItemAttributes.SmallImage.URL
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user