| Line 13... |
Line 13... |
| 13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
13 |
EbayItem as TEbayItem, BannerUriMapping as TBannerUriMapping, Campaign as TCampaign, \
|
| 14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
14 |
SnapdealItem as TSnapdealItem, SnapdealItemDetails as TSnapdealItemDetails,ProductFeedSubmit as TProductFeedSubmit, \
|
| 15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
15 |
MarketplaceItems as TMarketplaceItems, MarketplacePercentage as TMarketplacePercentage, \
|
| 16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
16 |
MarketPlaceItemPrice as TMarketPlaceItemPrice, FlipkartItem as TFlipkartItem,\
|
| 17 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
17 |
FlipkartItemDetails as TFlipkartItemDetails,MarketplaceHistory as TMarketplaceHistory,\
|
| 18 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp
|
18 |
PrivateDeal as TPrivateDeal, AmazonOutOfSync as TAmazonOutOfSync, PdPriceComp as TPdPriceComp, CompetitorPricing as TCompetitorPricing
|
| 19 |
from shop2020.utils.Utils import to_java_date
|
19 |
from shop2020.utils.Utils import to_java_date
|
| 20 |
|
20 |
|
| 21 |
def to_t_item(item):
|
21 |
def to_t_item(item):
|
| 22 |
t_item = Item()
|
22 |
t_item = Item()
|
| 23 |
if item is None:
|
23 |
if item is None:
|
| Line 571... |
Line 571... |
| 571 |
t_fk_item = to_t_flipkart_item(item)
|
571 |
t_fk_item = to_t_flipkart_item(item)
|
| 572 |
t_fk_item.marketplaceItems = to_t_marketplace_items(mpItem)
|
572 |
t_fk_item.marketplaceItems = to_t_marketplace_items(mpItem)
|
| 573 |
t_fk_item.item = to_t_item(dItem)
|
573 |
t_fk_item.item = to_t_item(dItem)
|
| 574 |
return t_fk_item
|
574 |
return t_fk_item
|
| 575 |
|
575 |
|
| - |
|
576 |
def to_t_competitor_pricing(compPricing):
|
| - |
|
577 |
xstr = lambda s: s or ""
|
| - |
|
578 |
item = compPricing[0]
|
| - |
|
579 |
catItem = compPricing[1]
|
| - |
|
580 |
t_comp = TCompetitorPricing()
|
| - |
|
581 |
t_comp.productName = xstr(catItem.brand)+" "+xstr(catItem.model_name)+" "+xstr(catItem.model_number)+" "+xstr(catItem.color)
|
| - |
|
582 |
t_comp.item_id = item.item_id
|
| - |
|
583 |
t_comp.lowestSnapdealPrice = item.lowestSnapdealPrice
|
| - |
|
584 |
t_comp.lowestFlipkartPrice = item.lowestFlipkartPrice
|
| - |
|
585 |
t_comp.lowestAmazonPrice = item.lowestAmazonPrice
|
| - |
|
586 |
t_comp.ourSnapdealPrice = item.ourSnapdealPrice
|
| - |
|
587 |
t_comp.ourSnapdealOfferPrice = item.ourSnapdealOfferPrice
|
| - |
|
588 |
t_comp.ourSnapdealInventory = item.ourSnapdealInventory
|
| - |
|
589 |
t_comp.lowestSnapdealOfferPrice = item.lowestSnapdealOfferPrice
|
| - |
|
590 |
if item.lowestSnapdealSeller is None:
|
| - |
|
591 |
t_comp.lowestSnapdealSeller=''
|
| - |
|
592 |
else:
|
| - |
|
593 |
t_comp.lowestSnapdealSeller = item.lowestSnapdealSeller
|
| - |
|
594 |
t_comp.lowestSnapdealSellerInventory = item.lowestSnapdealSellerInventory
|
| - |
|
595 |
t_comp.ourFlipkartPrice = item.ourFlipkartPrice
|
| - |
|
596 |
t_comp.ourFlipkartInventory = item.ourFlipkartInventory
|
| - |
|
597 |
if item.lowestFlipkartSeller is None:
|
| - |
|
598 |
t_comp.lowestFlipkartSeller=''
|
| - |
|
599 |
else:
|
| - |
|
600 |
t_comp.lowestFlipkartSeller = item.lowestFlipkartSeller
|
| - |
|
601 |
t_comp.ourMfnPrice = item.ourMfnPrice
|
| - |
|
602 |
t_comp.ourFbaPrice = item.ourFbaPrice
|
| - |
|
603 |
t_comp.ourMfnInventory = item.ourMfnInventory
|
| - |
|
604 |
t_comp.ourFbaInventory = item.ourFbaInventory
|
| - |
|
605 |
t_comp.lowestAmazonPrice = item.lowestAmazonPrice
|
| - |
|
606 |
if item.lowestAmazonSeller is None:
|
| - |
|
607 |
t_comp.lowestAmazonSeller=''
|
| - |
|
608 |
else:
|
| - |
|
609 |
t_comp.lowestAmazonSeller = item.lowestAmazonSeller
|
| - |
|
610 |
return t_comp
|
| - |
|
611 |
|
| 576 |
|
612 |
|