def __init__(self, name, id, brandName, color, retail, sale, weburl):
     if id > 0:
         self._productName=name
         self._brand=brandName
         self._color=color
         self._price=retail
         self._saleprice=sale
         self._webUrl=weburl
         from models import get_product_image
         self._pic_path=get_product_image(id)
     else:
         return
    def __init__(self, name, id, brand_id):
        self._productName=name
        if (id>0):
            from models import get_product_detail
            price=get_product_detail(id)
            self._price=price
            from models import get_product_image
            pic=get_product_image(id)
            self._pic_path=pic

        if (brand_id>0):
            from models import get_product_brand
            brand=get_product_brand(brand_id)
            self._brand=brand
        self._webUrl=''
        from models import get_product_link
        url=get_product_link(id)
        self._webUrl=url