chore: Cleanup Query Engine and Product query API

- Resolved merge conflicts in item_group.py
- Separate api.py file for product listing backend api
- Brought back ORM in query engine, handled missing cases (website item groups, etc)
- Return results from API in a descriptive manner, helps keep sanity in JS
- On toggling views store view preference in localStorage
This commit is contained in:
marination
2021-06-29 11:22:27 +05:30
parent cb52c98f02
commit 0dadf535c1
6 changed files with 132 additions and 101 deletions

View File

@@ -5,7 +5,7 @@ $(() => {
let is_item_group_page = $(".item-group-content").data("item-group");
this.item_group = is_item_group_page || null;
let view_type = "List View";
let view_type = localStorage.getItem("product_view") || "List View";
// Render Product Views, Filters & Search
frappe.require('/assets/js/e-commerce.min.js', function() {