initBasti / Amazon2PlentySync (public) (License: GPLv3) (since 2019-01-27) (hash sha1)
Transfer your data from you Amazon Flatfile spreadsheet over to the Plentymarkets system. How to is included in the readme

/product_import.py (33f0620d736ddf9a36a94f748269c15ba4e3f4b1) (2672 bytes) (mode 100644) (type blob)

from tkinter import Tk
from tkinter.filedialog import askopenfilename
from sys import exit
from packages.item_upload import itemUpload
from packages.attribute_upload import attributeUpload
from packages.variation_upload import variationUpload, setActive, EANUpload
from packages.stock_upload import stockUpload, priceUpload
from packages.UploadGUI import UploadGUI
from packages.amazon_data_upload import amazon_sku_upload


def main():
    #app = UploadGUI(None)
    #app.title("Amazon Flatfile to PlentyMarkets Upload")
    # app.mainloop()
    '''
    Command Line Test Version will be used within the GUI as soon as it is finished
    '''
    root = Tk()
    root.withdraw()
    sheet = askopenfilename()
    intern_number = askopenfilename()
    print("spreadsheet csv containing the flatfile : ", sheet)
    print("spreadsheet csv containing the intern numbers : ", intern_number)
    try:
        print("Item Upload")
        # itempath = itemUpload(sheet, intern_number)
    except Exception as exc:
        print(exc)
        print("Item Upload failed!")

    try:
        print("Variation Upload")
        # variationpath = variationUpload(sheet, intern_number)
    except Exception as exc:
        print(exc)
        print("VariationUpload failed!")

    print("\nGet a dataexport from the plentymarket site from the variation attributes, in order to access the current Variation ID.\n")
    try:
        export = askopenfilename()
    except FileNotFoundError:
        print("No Export File!")
    except Exception as exc:
        print(exc)
        print("Something went wrong at the Export file import!")
    print("spreadsheet csv containing the export : ", export)
    try:
        print("EAN, Active & Price Upload")
        # EANUpload(sheet, export)
        # setActive(sheet, export)
        # priceUpload(sheet, export)
    except FileNotFoundError as err:
        print(err)
        print("Missing Data, check if you have\n - a flatfile\n - a intern file table\n - export file from plentymarkets\n - a sheet with the stock numbers!\n")
        exit()
    print("\nOpen your amazon storage report and save it as an csv.\n")
    stocklist = askopenfilename()
    print("spreadsheet csv containing the current stock : ", stocklist)
    
    # stockUpload(sheet, export, stocklist)

    print("\nCreate a upload file for the SKU and Parent_SKU\nto connect existing items from amazon to plentyMarkets.\n")

    amazon_sku_upload(sheet, export)
    # In case of new attributes uncomment and watch attribute_upload.py first
    # try:
    # attributeUpload(sheet)
    # except:
    #print("Attribute Upload failed!")


if __name__ == '__main__':
    main()


Mode Type Size Ref File
100644 blob 713 a65d04669c3dd34cfd1f4778e26734202f791bc2 .gitignore
100644 blob 10299 816a1d0ee7f4496c32fdb92c7811eaf877d0efc0 LICENSE.md
100644 blob 22 f64078de7b935d0fc2c7e1596c83caca46ce87c4 README.md
040000 tree - f1972c13c4fd4f1fe976bb1ce1bc67dfce9f4f83 Upload
040000 tree - ed1d2bae3a506843a390f75bb07167c218fae046 packages
100644 blob 2672 33f0620d736ddf9a36a94f748269c15ba4e3f4b1 product_import.py
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/initBasti/Amazon2PlentySync

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/initBasti/Amazon2PlentySync

Clone this repository using git:
git clone git://git.rocketgit.com/user/initBasti/Amazon2PlentySync

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main