| Line 264... |
Line 264... |
| 264 |
itemMap['tagPricing'].append(tag)
|
264 |
itemMap['tagPricing'].append(tag)
|
| 265 |
|
265 |
|
| 266 |
catalogObjs = []
|
266 |
catalogObjs = []
|
| 267 |
for catalogId, catalogMap in catalogMap.iteritems():
|
267 |
for catalogId, catalogMap in catalogMap.iteritems():
|
| 268 |
print "catalogMap", catalogMap
|
268 |
print "catalogMap", catalogMap
|
| 269 |
active = True
|
269 |
active = False
|
| 270 |
itemsMap = catalogMap['items']
|
270 |
itemsMap = catalogMap['items']
|
| 271 |
itemObjs = []
|
271 |
itemObjs = []
|
| 272 |
for itemId, itemMap in itemsMap.iteritems():
|
272 |
for itemId, itemMap in itemsMap.iteritems():
|
| 273 |
tags = itemMap['tagPricing']
|
273 |
tags = itemMap['tagPricing']
|
| 274 |
for tag in tags:
|
274 |
for tag in tags:
|
| 275 |
active = active and tag.active
|
275 |
active = active or tag.active
|
| 276 |
itemObj = {'id':('itemtag-%s-%s' % (itemId, tag.tag_id)), 'color_s':itemMap['color'], 'itemId_i': itemId, 'tagId_i':tag.tag_id,
|
276 |
itemObj = {'id':('itemtag-%s-%s' % (itemId, tag.tag_id)), 'color_s':itemMap['color'], 'itemId_i': itemId, 'tagId_i':tag.tag_id,
|
| 277 |
'mrp_f':tag.mrp, 'mop_f': tag.mop, 'sellingPrice_f': tag.selling_price, 'active_b' : tag.active, 'hot_deal_b': tag.hot_deals}
|
277 |
'mrp_f':tag.mrp, 'mop_f': tag.mop, 'sellingPrice_f': tag.selling_price, 'active_b' : tag.active, 'hot_deal_b': tag.hot_deals}
|
| 278 |
itemObjs.append(itemObj)
|
278 |
itemObjs.append(itemObj)
|
| 279 |
catalogObj = {'id':'catalog' + str(catalogId), 'rank_i':catalogMap['rank'], 'title_s': catalogMap['title'],
|
279 |
catalogObj = {'id':'catalog' + str(catalogId), 'rank_i':catalogMap['rank'], 'title_s': catalogMap['title'],
|
| 280 |
'_childDocuments_':itemObjs,
|
280 |
'_childDocuments_':itemObjs,
|