blob: 3bb0142d0aff678a89d7657b50f1d877f463be73 [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
3from __future__ import unicode_literals
4
5no_cache = 1
6
7import frappe
8from erpnext.e_commerce.doctype.item_review.item_review import get_item_reviews
9
10def get_context(context):
11 context.full_page = True
12 context.reviews = None
13 if frappe.form_dict and frappe.form_dict.get("item_code"):
14 context.item_code = frappe.form_dict.get("item_code")
15 context.web_item = frappe.db.get_value("Website Item", {"item_code": context.item_code}, "name")
16 get_item_reviews(context.web_item, 0, 10, context)