| Line 19... |
Line 19... |
| 19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
| 20 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
20 |
FreebieItem, BrandInfo, Amazonlisted, StorePricing, ItemVatMaster, \
|
| 21 |
PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
|
21 |
PageViewEvents, CartEvents, EbayItem, BannerUriMapping, Campaign, SnapdealItem, \
|
| 22 |
ProductFeedSubmit, MarketplaceItems, MarketPlaceItemPrice, \
|
22 |
ProductFeedSubmit, MarketplaceItems, MarketPlaceItemPrice, \
|
| 23 |
SourcePercentageMaster, SourceItemPercentage, FlipkartItem, MarketPlaceUpdateHistory, \
|
23 |
SourcePercentageMaster, SourceItemPercentage, FlipkartItem, MarketPlaceUpdateHistory, \
|
| 24 |
SourceCategoryPercentage, MarketPlaceHistory, PrivateDeals
|
24 |
SourceCategoryPercentage, MarketPlaceHistory, PrivateDeals, AmazonOutOfSync
|
| 25 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
25 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
| 26 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, \
|
26 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, \
|
| 27 |
StorePricing as tStorePricing, CatalogServiceException, \
|
27 |
StorePricing as tStorePricing, CatalogServiceException, \
|
| 28 |
BannerType, InsurerType, Banner as t_banner
|
28 |
BannerType, InsurerType, Banner as t_banner
|
| 29 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
29 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
| Line 205... |
Line 205... |
| 205 |
ds_item.mrp = item.mrp
|
205 |
ds_item.mrp = item.mrp
|
| 206 |
if ds_item.sellingPrice or item.sellingPrice:
|
206 |
if ds_item.sellingPrice or item.sellingPrice:
|
| 207 |
if ds_item.sellingPrice != item.sellingPrice:
|
207 |
if ds_item.sellingPrice != item.sellingPrice:
|
| 208 |
amazonItem = get_amazon_item_details(item.id)
|
208 |
amazonItem = get_amazon_item_details(item.id)
|
| 209 |
if amazonItem is not None:
|
209 |
if amazonItem is not None:
|
| - |
|
210 |
outOfSync = AmazonOutOfSync.get_by(item_id=item.id)
|
| - |
|
211 |
if outOfSync is None:
|
| 210 |
amazonItem.fbaPrice = item.sellingPrice
|
212 |
amazonItem.fbaPrice = item.sellingPrice
|
| 211 |
amazonItem.sellingPrice=item.sellingPrice
|
213 |
amazonItem.sellingPrice=item.sellingPrice
|
| - |
|
214 |
amazonItem.fbbPrice=item.sellingPrice
|
| 212 |
amazonItem.mfnPriceLastUpdatedOn = datetime.datetime.now()
|
215 |
amazonItem.mfnPriceLastUpdatedOn = datetime.datetime.now()
|
| 213 |
amazonItem.fbaPriceLastUpdatedOn = datetime.datetime.now()
|
216 |
amazonItem.fbaPriceLastUpdatedOn = datetime.datetime.now()
|
| - |
|
217 |
amazonItem.fbbPriceLastUpdatedOn = datetime.datetime.now()
|
| 214 |
message +="Amazon Prices Synced."
|
218 |
message +="Amazon Prices Synced."
|
| - |
|
219 |
else:
|
| - |
|
220 |
if not outOfSync.mfn:
|
| - |
|
221 |
amazonItem.sellingPrice=item.sellingPrice
|
| - |
|
222 |
amazonItem.mfnPriceLastUpdatedOn = datetime.datetime.now()
|
| - |
|
223 |
message +="MFN Price Synced."
|
| - |
|
224 |
if not outOfSync.fba:
|
| - |
|
225 |
amazonItem.fbaPrice=item.sellingPrice
|
| - |
|
226 |
amazonItem.fbaPriceLastUpdatedOn = datetime.datetime.now()
|
| - |
|
227 |
message +="FBA Price Synced."
|
| - |
|
228 |
if not outOfSync.fbb:
|
| - |
|
229 |
amazonItem.fbbPrice=item.sellingPrice
|
| - |
|
230 |
amazonItem.fbbPriceLastUpdatedOn = datetime.datetime.now()
|
| - |
|
231 |
message +="FBB Price Synced."
|
| - |
|
232 |
|
| 215 |
message += "Selling Price is changed from {0} to {1}.\n".format(ds_item.sellingPrice, item.sellingPrice)
|
233 |
message += "Selling Price is changed from {0} to {1}.\n".format(ds_item.sellingPrice, item.sellingPrice)
|
| 216 |
|
234 |
|
| 217 |
ds_item.sellingPrice = item.sellingPrice
|
235 |
ds_item.sellingPrice = item.sellingPrice
|
| 218 |
ds_item.weight = item.weight
|
236 |
ds_item.weight = item.weight
|
| 219 |
ds_item.showSellingPrice = item.showSellingPrice
|
237 |
ds_item.showSellingPrice = item.showSellingPrice
|