| Line 137... |
Line 137... |
| 137 |
if not catalogMap.has_key(item.catalog_item_id):
|
137 |
if not catalogMap.has_key(item.catalog_item_id):
|
| 138 |
catalogObj = {}
|
138 |
catalogObj = {}
|
| 139 |
catalogObj['title'] = " ".join(filter(None, [item.brand, item.model_name, item.model_number]))
|
139 |
catalogObj['title'] = " ".join(filter(None, [item.brand, item.model_name, item.model_number]))
|
| 140 |
catalogObj['brand'] = item.brand
|
140 |
catalogObj['brand'] = item.brand
|
| 141 |
catalogObj['identifier'] = item.catalog_item_id
|
141 |
catalogObj['identifier'] = item.catalog_item_id
|
| 142 |
catalogObj['hot_deals']=tag.hot_deals
|
- |
|
| 143 |
catalogObj['items'] = {}
|
142 |
catalogObj['items'] = {}
|
| - |
|
143 |
catalogObj['hot_deals'] = "False"
|
| 144 |
filterMap = {"_id":item.catalog_item_id}
|
144 |
filterMap = {"_id":item.catalog_item_id}
|
| 145 |
#Dont include it catalog not available
|
145 |
#Dont include it catalog not available
|
| 146 |
try:
|
146 |
try:
|
| 147 |
catalogObj['imageUrl'] = get_mongo_connection(options.mongoHost).CONTENT.siteContent.find_one(filterMap, projection)['defaultImageUrl']
|
147 |
catalogObj['imageUrl'] = get_mongo_connection(options.mongoHost).CONTENT.siteContent.find_one(filterMap, projection)['defaultImageUrl']
|
| 148 |
print catalogObj['imageUrl']
|
148 |
print catalogObj['imageUrl']
|
| Line 160... |
Line 160... |
| 160 |
traceback.print_exc()
|
160 |
traceback.print_exc()
|
| 161 |
#Mobile and tablets are showcased in same category
|
161 |
#Mobile and tablets are showcased in same category
|
| 162 |
catalogObj['categoryId'] = 3 if item.category in [10006, 10009] else 6
|
162 |
catalogObj['categoryId'] = 3 if item.category in [10006, 10009] else 6
|
| 163 |
catalogMap[item.catalog_item_id] = catalogObj
|
163 |
catalogMap[item.catalog_item_id] = catalogObj
|
| 164 |
|
164 |
|
| - |
|
165 |
if tag.hot_deals:
|
| - |
|
166 |
catalogObj['hot_deals'] = "True"
|
| 165 |
catalogObj = catalogMap.get(item.catalog_item_id)
|
167 |
catalogObj = catalogMap.get(item.catalog_item_id)
|
| 166 |
|
168 |
|
| 167 |
if not catalogObj['items'].has_key(item.id):
|
169 |
if not catalogObj['items'].has_key(item.id):
|
| 168 |
catalogObj['items'][item.id] = {'color': item.color, 'tagPricing':[]}
|
170 |
catalogObj['items'][item.id] = {'color': item.color, 'tagPricing':[]}
|
| 169 |
|
171 |
|