Esempio n. 1
0
	def prepare_template_args(self):
		from website.helpers.product import get_parent_item_groups
		self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}]
		self.doc.title = self.doc.item_name

		if self.doc.slideshow:
			from website.helpers.slideshow import get_slideshow
			get_slideshow(self)								
Esempio n. 2
0
	def prepare_template_args(self):
		from website.helpers.product import get_parent_item_groups, url_for_website
		self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}]
		self.doc.website_image = url_for_website(self.doc.website_image)

		if self.doc.slideshow:
			from website.helpers.slideshow import get_slideshow
			get_slideshow(self)
Esempio n. 3
0
	def prepare_template_args(self):
		from website.helpers.product import get_parent_item_groups
		self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{"name":self.doc.name}]
		self.doc.title = self.doc.item_name

		if self.doc.slideshow:
			from website.helpers.slideshow import get_slideshow
			get_slideshow(self)								
Esempio n. 4
0
    def prepare_template_args(self):
        from website.helpers.product import get_parent_item_groups, url_for_website
        self.parent_groups = get_parent_item_groups(self.doc.item_group) + [{
            "name":
            self.doc.name
        }]
        self.doc.website_image = url_for_website(self.doc.website_image)

        if self.doc.slideshow:
            from website.helpers.slideshow import get_slideshow
            get_slideshow(self)
Esempio n. 5
0
	def prepare_template_args(self):
		from website.helpers.product import get_product_list_for_group, \
			get_parent_item_groups, get_group_item_count

		self.doc.sub_groups = webnotes.conn.sql("""select name, page_name
			from `tabItem Group` where parent_item_group=%s
			and ifnull(show_in_website,0)=1""", self.doc.name, as_dict=1)

		for d in self.doc.sub_groups:
			d.count = get_group_item_count(d.name)
			
		self.doc.items = get_product_list_for_group(product_group = self.doc.name, limit=20)
		self.parent_groups = get_parent_item_groups(self.doc.name)

		if self.doc.slideshow:
			from website.helpers.slideshow import get_slideshow
			get_slideshow(self)