mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
chore: Re-organise files,remove T&C modal in cart
- Moved product query and filters engine to `product_data_engine` folder - Moved product grid, list, search, view to `product_ui` folder - Renamed `website_item_indexing.py` to `redisearch.py` - Render Terms and Conditions server side along with the rest of the Shopping cart. Don’t make another db call - Style changes to terms and conditions - Deleted unused `cart_terms.html` - Removed print statements
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
import frappe
|
||||
from frappe.utils import cint
|
||||
|
||||
from erpnext.e_commerce.product_query import ProductQuery
|
||||
from erpnext.e_commerce.filters import ProductFiltersBuilder
|
||||
from erpnext.e_commerce.product_data_engine.query import ProductQuery
|
||||
from erpnext.e_commerce.product_data_engine.filters import ProductFiltersBuilder
|
||||
from erpnext.setup.doctype.item_group.item_group import get_child_groups
|
||||
|
||||
@frappe.whitelist(allow_guest=True)
|
||||
|
||||
@@ -8,7 +8,7 @@ from frappe.utils import cint, comma_and
|
||||
from frappe import _, msgprint
|
||||
from frappe.model.document import Document
|
||||
from frappe.utils import unique
|
||||
from erpnext.e_commerce.website_item_indexing import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET, is_search_module_loaded
|
||||
from erpnext.e_commerce.redisearch import create_website_items_index, ALLOWED_INDEXABLE_FIELDS_SET, is_search_module_loaded
|
||||
|
||||
class ShoppingCartSetupError(frappe.ValidationError): pass
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ from erpnext.e_commerce.shopping_cart.cart import _set_price_list
|
||||
from erpnext.utilities.product import get_price
|
||||
|
||||
# SEARCH
|
||||
from erpnext.e_commerce.website_item_indexing import (
|
||||
from erpnext.e_commerce.redisearch import (
|
||||
insert_item_to_index,
|
||||
update_index_for_item,
|
||||
delete_item_from_index
|
||||
|
||||
@@ -6,6 +6,7 @@ from whoosh.qparser import MultifieldParser, FieldsPlugin, WildcardPlugin
|
||||
from whoosh.analysis import StemmingAnalyzer
|
||||
from whoosh.query import Prefix
|
||||
|
||||
# TODO: Make obsolete
|
||||
INDEX_NAME = "products"
|
||||
|
||||
class ProductSearch(FullTextSearch):
|
||||
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
|
||||
from bs4 import BeautifulSoup
|
||||
import frappe, unittest
|
||||
from frappe.utils import get_html_for_route
|
||||
from erpnext.e_commerce.product_query import ProductQuery
|
||||
from erpnext.e_commerce.product_data_engine.query import ProductQuery
|
||||
from erpnext.e_commerce.doctype.website_item.website_item import make_website_item
|
||||
|
||||
test_dependencies = ["Item"]
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe import _dict
|
||||
from frappe.utils import floor
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# Copyright (c) 2021, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
import frappe
|
||||
@@ -49,7 +49,7 @@ erpnext.ProductSearch = class {
|
||||
|
||||
// Fetch and populate product results
|
||||
frappe.call({
|
||||
method: "erpnext.templates.pages.product_search.search",
|
||||
method: "erpnext.templates.pages.e_commerce.product_search.search",
|
||||
args: {
|
||||
query: query
|
||||
},
|
||||
@@ -61,7 +61,7 @@ erpnext.ProductSearch = class {
|
||||
// Populate categories
|
||||
if (me.category_container) {
|
||||
frappe.call({
|
||||
method: "erpnext.templates.pages.product_search.get_category_suggestions",
|
||||
method: "erpnext.templates.pages.e_commerce.product_search.get_category_suggestions",
|
||||
args: {
|
||||
query: query
|
||||
},
|
||||
Reference in New Issue
Block a user