Subversion Repositories SmartDukaan

Rev

Rev 14499 | Rev 14531 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14499 Rev 14507
Line 690... Line 690...
690
            val['skuBundleId'] = ""
690
            val['skuBundleId'] = ""
691
        data.append(val)
691
        data.append(val)
692
    return data
692
    return data
693
    
693
    
694
def addFeaturedDeal(data):
694
def addFeaturedDeal(data):
695
    collection = get_mongo_connection().Catalog.ManualDeals
695
    collection = get_mongo_connection().Catalog.FeaturedDeals
696
    cursor = collection.find({'sku':data['sku'],'startDate':{'$lte':data['startDate']},'endDate':{'$gte':data['endDate']}})
696
    cursor = collection.find({'sku':data['sku'],'startDate':{'$lte':data['startDate']},'endDate':{'$gte':data['endDate']}})
697
    if cursor.count() > 0:
697
    if cursor.count() > 0:
698
        return {0:"Sku information already present."}
698
        return {0:"Sku information already present."}
699
    else:
699
    else:
700
        collection.insert(data)
700
        collection.insert(data)
Line 732... Line 732...
732
                    val['brand'] = ""
732
                    val['brand'] = ""
733
                    val['source_product_name'] = ""
733
                    val['source_product_name'] = ""
734
                    val['skuBundleId'] = ""
734
                    val['skuBundleId'] = ""
735
                data.append(val)
735
                data.append(val)
736
        return data
736
        return data
737
        
-
 
738
    
-
 
739
 
-
 
740
 
-
 
741
 
737
 
742
def main():
738
def main():
743
    print searchMaster(0, 10, "iphone")
739
    print searchMaster(0, 10, "iphone")
744
    
740
    
745
    
741