Subversion Repositories SmartDukaan

Rev

Rev 19437 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19437 Rev 19590
Line 11... Line 11...
11
 
11
 
12
 
12
 
13
def addData(bulkItemsList):
13
def addData(bulkItemsList):
14
    notAdded = []
14
    notAdded = []
15
    for item in bulkItemsList:
15
    for item in bulkItemsList:
16
        v= ProductInfo(None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None)
16
        v= ProductInfo(None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None,None)
17
        v. _id = None
17
        v. _id = None
18
        v.addedOn = to_java_date(datetime.now())
18
        v.addedOn = to_java_date(datetime.now())
19
        v.available_price = item.available_price 
19
        v.available_price = item.available_price 
20
        v.brand = item.brand 
20
        v.brand = item.brand 
21
        v.cashback = ""
21
        v.cashback = ""
Line 58... Line 58...
58
        v.subCategoryId = item.subCategoryId
58
        v.subCategoryId = item.subCategoryId
59
        v.subCategory= SUB_CATEGORY_MAP.get(item.subCategoryId)
59
        v.subCategory= SUB_CATEGORY_MAP.get(item.subCategoryId)
60
        v.showMrp = 1 if item.showMrpFlag else 0
60
        v.showMrp = 1 if item.showMrpFlag else 0
61
        v.shippingCost = 0
61
        v.shippingCost = 0
62
        v.showNetPrice = 1 if item.showNetPrice else 0
62
        v.showNetPrice = 1 if item.showNetPrice else 0
63
        
63
        v.internalRank = item.internalRank
64
         
64
         
65
        try:
65
        try:
66
            col = list(get_mongo_connection_cms(host=mongo_cms_host).CONTENT.siteContent.find({'_id':long(v.identifier)}))
66
            col = list(get_mongo_connection_cms(host=mongo_cms_host).CONTENT.siteContent.find({'_id':long(v.identifier)}))
67
            if len(col) ==0:
67
            if len(col) ==0:
68
                print "Content not found for %s"%(v.identifier)
68
                print "Content not found for %s"%(v.identifier)