| Line 17... |
Line 17... |
| 17 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
17 |
Category, EntityIDGenerator, SimilarItems, ProductNotification, Source, \
|
| 18 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
18 |
SourceItemPricing, AuthorizationLog, VoucherItemMapping, CategoryVatMaster, \
|
| 19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
19 |
OOSTracker, EntityTag, ItemInsurerMapping, Insurer, Banner, BannerMap, \
|
| 20 |
FreebieItem, BrandInfo, \
|
20 |
FreebieItem, BrandInfo, \
|
| 21 |
OOSTracker,EntityTag,ItemInsurerMapping, Insurer, Banner, BannerMap, FreebieItem,\
|
21 |
OOSTracker,EntityTag,ItemInsurerMapping, Insurer, Banner, BannerMap, FreebieItem,\
|
| 22 |
StorePricing
|
22 |
StorePricing,Amazonlisted
|
| 23 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
23 |
from shop2020.thriftpy.model.v1.catalog.ttypes import status, ItemShippingInfo, \
|
| 24 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, StorePricing as tStorePricing
|
24 |
ItemType, PremiumType, FreebieItem as t_FreebieItem, StorePricing as tStorePricing
|
| 25 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
25 |
from shop2020.thriftpy.model.v1.inventory.ttypes import \
|
| 26 |
InventoryServiceException, IgnoredInventoryUpdateItems
|
26 |
InventoryServiceException, IgnoredInventoryUpdateItems
|
| 27 |
from shop2020.utils import EmailAttachmentSender
|
27 |
from shop2020.utils import EmailAttachmentSender
|
| Line 1533... |
Line 1533... |
| 1533 |
|
1533 |
|
| 1534 |
sp.recommendedPrice = store.recommendedPrice
|
1534 |
sp.recommendedPrice = store.recommendedPrice
|
| 1535 |
sp.minPrice = store.minPrice
|
1535 |
sp.minPrice = store.minPrice
|
| 1536 |
sp.minAdvancePrice = store.minAdvancePrice
|
1536 |
sp.minAdvancePrice = store.minAdvancePrice
|
| 1537 |
sp.maxPrice = store.maxPrice
|
1537 |
sp.maxPrice = store.maxPrice
|
| 1538 |
return sp
|
- |
|
| 1539 |
|
1538 |
return sp
|
| - |
|
1539 |
|
| - |
|
1540 |
def get_all_amazon_listed_items():
|
| - |
|
1541 |
return session.query(Amazonlisted).all()
|
| - |
|
1542 |
|
| - |
|
1543 |
def get_amazon_item_details(amazonItemId):
|
| - |
|
1544 |
amazonlisted = Amazonlisted.get_by(itemId=amazonItemId)
|
| - |
|
1545 |
return amazonlisted
|
| - |
|
1546 |
|
| - |
|
1547 |
def update_amazon_item_details(amazonItemId,fbaPrice,sellingPrice,isFba,isNonFba,isInventoryOverride):
|
| - |
|
1548 |
amazonlisted = Amazonlisted.get_by(itemId = amazonItemId)
|
| - |
|
1549 |
amazonlisted.fbaPrice=fbaPrice
|
| - |
|
1550 |
amazonlisted.sellingPrice=sellingPrice
|
| - |
|
1551 |
amazonlisted.isFba=isFba
|
| - |
|
1552 |
amazonlisted.isNonFba=isNonFba
|
| - |
|
1553 |
amazonlisted.isInventoryOverride=isInventoryOverride
|
| - |
|
1554 |
session.commit()
|
| - |
|
1555 |
|
| - |
|
1556 |
def add_amazon_item(amazonlisted):
|
| - |
|
1557 |
if (not amazonlisted) or (not amazonlisted.itemid) or (not amazonlisted.asin):
|
| - |
|
1558 |
return
|
| - |
|
1559 |
amazon_item = Amazonlisted()
|
| - |
|
1560 |
if amazonlisted.itemid:
|
| - |
|
1561 |
amazon_item.itemId=amazonlisted.itemid
|
| - |
|
1562 |
if amazonlisted.asin:
|
| - |
|
1563 |
amazon_item.asin=amazonlisted.asin
|
| - |
|
1564 |
if amazonlisted.brand:
|
| - |
|
1565 |
amazon_item.brand=amazonlisted.brand
|
| - |
|
1566 |
if amazonlisted.model:
|
| - |
|
1567 |
amazon_item.model=amazonlisted.model
|
| - |
|
1568 |
if amazonlisted.manufacturer_name:
|
| - |
|
1569 |
amazon_item.manufacturer_name=amazonlisted.manufacturer_name
|
| - |
|
1570 |
if amazonlisted.name:
|
| - |
|
1571 |
amazon_item.name=amazonlisted.name
|
| - |
|
1572 |
if amazonlisted.part_number:
|
| - |
|
1573 |
amazon_item.part_number=amazonlisted.part_number
|
| - |
|
1574 |
if amazonlisted.ean:
|
| - |
|
1575 |
amazon_item.ean=amazonlisted.ean
|
| - |
|
1576 |
if amazonlisted.upc:
|
| - |
|
1577 |
amazon_item.upc=amazonlisted.upc
|
| - |
|
1578 |
if amazonlisted.sellingPrice:
|
| - |
|
1579 |
amazon_item.sellingPrice=amazonlisted.sellingPrice
|
| - |
|
1580 |
if amazonlisted.fbaPrice:
|
| - |
|
1581 |
amazon_item.fbaPrice=amazonlisted.fbaPrice
|
| - |
|
1582 |
if amazonlisted.isFba:
|
| - |
|
1583 |
amazon_item.isFba=amazonlisted.isFba
|
| - |
|
1584 |
if amazonlisted.isNonFba:
|
| - |
|
1585 |
amazon_item.isNonFba=amazonlisted.isNonFba
|
| - |
|
1586 |
if amazonlisted.isInventoryOverride:
|
| - |
|
1587 |
amazon_item.isInventoryOverride=amazonlisted.isInventoryOverride
|
| - |
|
1588 |
if amazonlisted.color:
|
| - |
|
1589 |
amazon_item.color=amazonlisted.color
|
| - |
|
1590 |
if amazonlisted.category:
|
| - |
|
1591 |
amazon_item.color=amazonlisted.category
|
| - |
|
1592 |
session.commit()
|
| - |
|
1593 |
|
| - |
|
1594 |
|
| - |
|
1595 |
|
| - |
|
1596 |
|
| - |
|
1597 |
|
| - |
|
1598 |
|
| - |
|
1599 |
|
| 1540 |
|
1600 |
|