blob: b9c8a013c753e88f37efed8cd160d40680de4ada [file] [log] [blame]
marinationc8423052021-04-07 23:49:04 +05301# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
2# License: GNU General Public License v3. See license.txt
marinationc8423052021-04-07 23:49:04 +05303import frappe
4from erpnext.e_commerce.doctype.item_review.item_review import get_item_reviews
5
6def get_context(context):
marinationb29c5d62021-05-25 01:35:22 +05307 context.no_cache = 1
marinationc8423052021-04-07 23:49:04 +05308 context.full_page = True
9 context.reviews = None
marinationb29c5d62021-05-25 01:35:22 +053010
marinationc8423052021-04-07 23:49:04 +053011 if frappe.form_dict and frappe.form_dict.get("item_code"):
12 context.item_code = frappe.form_dict.get("item_code")
13 context.web_item = frappe.db.get_value("Website Item", {"item_code": context.item_code}, "name")
14 get_item_reviews(context.web_item, 0, 10, context)