Subversion Repositories SmartDukaan

Rev

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

Rev 12396 Rev 12407
Line 204... Line 204...
204
            store_message += "Saholic MOP Changed. DP {0} is less than Saholic MOP.\n".format(sp.minPrice)
204
            store_message += "Saholic MOP Changed. DP {0} is less than Saholic MOP.\n".format(sp.minPrice)
205
                   
205
                   
206
    ds_item.mrp = item.mrp
206
    ds_item.mrp = item.mrp
207
    if ds_item.sellingPrice or item.sellingPrice:
207
    if ds_item.sellingPrice or item.sellingPrice:
208
        if ds_item.sellingPrice != item.sellingPrice:
208
        if ds_item.sellingPrice != item.sellingPrice:
209
            amazonItem = get_amazon_item_details(item.id)
209
            amazonItem = (get_amazon_item_details(item.id))[0]
210
            if amazonItem is not None:
210
            if amazonItem is not None:
211
                outOfSync = AmazonOutOfSync.get_by(item_id=item.id)
211
                outOfSync = AmazonOutOfSync.get_by(item_id=item.id)
212
                if outOfSync is None:
212
                if outOfSync is None:
213
                    amazonItem.fbaPrice = item.sellingPrice
213
                    amazonItem.fbaPrice = item.sellingPrice
214
                    amazonItem.sellingPrice=item.sellingPrice
214
                    amazonItem.sellingPrice=item.sellingPrice
Line 2041... Line 2041...
2041
    cart_event.eventTimestamp = to_py_date(cartEvent.eventDate)
2041
    cart_event.eventTimestamp = to_py_date(cartEvent.eventDate)
2042
    session.commit()
2042
    session.commit()
2043
 
2043
 
2044
def update_amazon_attributes_in_bulk(amazonlistedMap):
2044
def update_amazon_attributes_in_bulk(amazonlistedMap):
2045
    for itemId,amazonlisted in amazonlistedMap.iteritems():
2045
    for itemId,amazonlisted in amazonlistedMap.iteritems():
2046
        amazon_item = get_amazon_item_details(itemId)
2046
        amazon_item = (get_amazon_item_details(itemId))[0]
2047
        if amazon_item is not None:
2047
        if amazon_item is not None:
2048
            if amazon_item.sellingPrice != amazonlisted.sellingPrice:
2048
            if amazon_item.sellingPrice != amazonlisted.sellingPrice:
2049
                amazon_item.mfnPriceLastUpdatedOn = datetime.datetime.now()
2049
                amazon_item.mfnPriceLastUpdatedOn = datetime.datetime.now()
2050
                amazon_item.sellingPrice = amazonlisted.sellingPrice
2050
                amazon_item.sellingPrice = amazonlisted.sellingPrice
2051
            if amazon_item.fbaPrice != amazonlisted.fbaPrice:
2051
            if amazon_item.fbaPrice != amazonlisted.fbaPrice: