Example #1
0
	def get_context(self):
		from selling.utils.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.doctype.website_slideshow.website_slideshow import get_slideshow
			get_slideshow(self)								
Example #2
0
    def get_context(self):
        from selling.utils.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.doctype.website_slideshow.website_slideshow import get_slideshow
            get_slideshow(self)
Example #3
0
	def get_context(self):
		from selling.utils.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=100)
		self.parent_groups = get_parent_item_groups(self.doc.name)
		self.doc.title = self.doc.name

		if self.doc.slideshow:
			from website.doctype.website_slideshow.website_slideshow import get_slideshow
			get_slideshow(self)
Example #4
0
    def get_context(self):
        from selling.utils.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=100)
        self.parent_groups = get_parent_item_groups(self.doc.name)
        self.doc.title = self.doc.name

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