feat: Customer Ratings & Reviews Full Page

- Created macros for repetitive snippets
- Created Customer Reviews full page
- View more button to reveal 10 more reviews at a time
- Common function to get reviews with start and end
This commit is contained in:
marination
2021-04-07 23:49:04 +05:30
parent b15ff57a66
commit c842305be0
12 changed files with 316 additions and 83 deletions

View File

@@ -170,7 +170,7 @@ def get_item_for_list_in_html(context):
def get_parent_item_groups(item_group_name, from_item=False):
base_nav_page = {"name": frappe._("Shop by Category"), "route":"/shop-by-category"}
if from_item:
if from_item and frappe.request.environ.get("HTTP_REFERER"):
# base page after 'Home' will vary on Item page
last_page = frappe.request.environ["HTTP_REFERER"].split('/')[-1]
if last_page and last_page in ("shop-by-category", "all-products"):