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
List of commits:
Subject Hash Author Date (UTC)
Added an optimization for the initial directory for Linux 58b340605cba0603520ada8a184cc9fba5f8c3b8 Sebastian Fricke 2019-04-16 10:22:18
Fixed a typo in the build script f7943d8b2c33b89b083380902f1b1281366a12b2 Sebastian Fricke 2019-04-16 08:13:51
Added a build script for Linux + removed the finished executables 8fcf82d5de859895d29a7f355c0d49700beb4e38 Sebastian Fricke 2019-04-16 08:10:13
Changed the EAN type from UPC to GTIN_13 which is the correct one. ea74c1d8c001ae6895f07bbecbcb9a0898400b95 Sebastian Fricke 2019-04-15 13:04:54
fixed a bug with item_name + changed the item_name assignment to include the variation name instead of the parent name 7dedb2bb9afac7d5625ccbf9c05f6ff4b1b1e5e1 LagerBadel PC:Magdalena 2019-04-15 12:32:33
Added usage instructions in english and german language. e2f291e2a00ac9283ab9d843e652d7b77fa6bbaf Sebastian Fricke 2019-04-15 09:59:36
Added usage instructions in english and german language. 30646f203ae8847cfa4971cb62187dca8406b8d7 Sebastian Fricke 2019-04-15 09:58:26
Fixed small compilation mistakes concerning positional arguments dc011ec52cf578e2910edde1aeacb893bb2e57f9 Sebastian Fricke 2019-04-15 07:16:14
Fixed a problem with the Upload folder when the executable is within its Folder outside of the root 6ca74a5bbbf13036405c654225de2540cddf2ed0 Sebastian Fricke 2019-04-15 07:02:13
Small improvements with the error handling inside item_upload.py 8d8361aa6ca7fca69407fb6c2f7450a9fd3ad40d LagerBadel PC:Magdalena 2019-04-12 12:31:39
Fixed the Windows Version because of corrupted Sym Links from the Windows Version 21c1d49e6508a27e3ba86741843c4141e09be2ee Sebastian Fricke 2019-04-12 11:57:28
The push from the windows machine corrupted the Linux Version, it is now re compiled. 1a642842228b959ad9ca1253b6e0df25d75e3d67 Sebastian Fricke 2019-04-12 09:34:27
Added a executable File db4d6f812ada2d497e2ffa255ddf62fd88c98e9f Sebastian Fricke 2019-04-12 08:24:14
current working version 10-04-19 f57799f6815c8c76217f64e292d6cf61e0deffb7 Sebastian Fricke 2019-04-10 14:40:36
Changed the collection_name field to the newer seasons field in the property upload b13a2282d20e97f6f414e02ace9673246678adc4 Sebastian Fricke 2019-03-29 09:59:05
Added a feature upload and removed a test print from the barcode upload b04dc65a93ff10c650cdaf48d1a7922ff4769ecc Sebastian Fricke 2019-03-28 14:57:54
Added FNSKU code and removed freetext fields to replace them with properties 4f77496d60be1afbd90a7279b14643267b4430cc Sebastian Fricke 2019-03-27 11:09:55
Added FNSKU code and removed freetext fields to replace them with properties 3d76e8769337dd96fa02503eb242fd192f3c148d Sebastian Fricke 2019-03-27 11:06:41
Update to property Upload because it isn't necessary to have a property for each material 37c01ce472dc85a9f7a39bd164a2ea53c28b4955 Sebastian Fricke 2019-03-18 16:08:14
added a filter for items with only 1 size that currently works with single parent child combinations fd3bf2b659614d5518884eb3da77b564cd0018eb Sebastian Fricke 2019-02-28 16:08:57
Commit 58b340605cba0603520ada8a184cc9fba5f8c3b8 - Added an optimization for the initial directory for Linux
Author: Sebastian Fricke
Author date (UTC): 2019-04-16 10:22
Committer name: Sebastian Fricke
Committer date (UTC): 2019-04-16 10:22
Parent(s): f7943d8b2c33b89b083380902f1b1281366a12b2
Signing key:
Tree: 7909702795ddb6f64d19a4f53d3af51641f633e1
File Lines added Lines deleted
product_import.py 31 16
File product_import.py changed (mode: 100644) (index 1728a98..baafc96)
1 1 from tkinter import Tk from tkinter import Tk
2 2 from tkinter.filedialog import askopenfilename, askdirectory from tkinter.filedialog import askopenfilename, askdirectory
3 3 import sys import sys
4 import platform
5 import os
4 6 from packages.item_upload import itemUpload, itemPropertyUpload from packages.item_upload import itemUpload, itemPropertyUpload
5 # from packages.attribute_upload import attributeUpload
6 7 from packages.variation_upload import variationUpload, setActive, EANUpload, marketConnection from packages.variation_upload import variationUpload, setActive, EANUpload, marketConnection
7 8 from packages.stock_upload import stockUpload, priceUpload from packages.stock_upload import stockUpload, priceUpload
8 9 from packages.amazon_data_upload import amazonSkuUpload, amazonDataUpload, asinUpload, featureUpload from packages.amazon_data_upload import amazonSkuUpload, amazonDataUpload, asinUpload, featureUpload
 
... ... def main():
18 19 ''' '''
19 20 root = Tk() root = Tk()
20 21 root.withdraw() root.withdraw()
21 sheet = askopenfilename(initialdir="../",
22 # Check if the os is Linux, in that case the initial directory is Documents
23 # Unless Documents is not available in which case it is ~
24 initial_directory = '../'
25
26 if(platform.system() == 'Linux'):
27 if(os.path.exists(path='/home/' + os.getlogin() + '/Documents/')):
28 initial_directory = '/home/' + os.getlogin() + '/Documents/'
29 else:
30 initial_directory = '/home/' + os.getlogin()
31
32 sheet = askopenfilename(initialdir=initial_directory,
22 33 title="Amazon Flatfile as .csv", title="Amazon Flatfile as .csv",
23 34 filetypes=[ ("csv files", "*.csv") ]) filetypes=[ ("csv files", "*.csv") ])
24 intern_number = askopenfilename(initialdir="../",
35 intern_number = askopenfilename(initialdir=initial_directory,
25 36 title="The Intern Numbers as .csv", title="The Intern Numbers as .csv",
26 37 filetypes=[ ("csv files", "*.csv") ]) filetypes=[ ("csv files", "*.csv") ])
27 upload_folder = askdirectory(initialdir="../",
38 upload_folder = askdirectory(initialdir=initial_directory,
28 39 title="Choose a folder for the upload files.") title="Choose a folder for the upload files.")
29 erroritem = ''
40
30 41 print("spreadsheet csv containing the flatfile : ", sheet) print("spreadsheet csv containing the flatfile : ", sheet)
31 42 print("spreadsheet csv containing the intern numbers : ", intern_number) print("spreadsheet csv containing the intern numbers : ", intern_number)
43
32 44 try: try:
33 45 print("\nItem Upload\n") print("\nItem Upload\n")
34 erroritem = itemUpload(sheet, intern_number, upload_folder)
46 itemUpload(sheet, intern_number, upload_folder)
35 47 except Exception as exc: except Exception as exc:
36 48 print("Item Upload failed!\n") print("Item Upload failed!\n")
37 49 print("Here: ", exc, '\n') print("Here: ", exc, '\n')
 
... ... def main():
40 52 e = sys.exc_info() e = sys.exc_info()
41 53 for element in e: for element in e:
42 54 print(element) print(element)
55
43 56 try: try:
44 57 print("\nVariation Upload\n") print("\nVariation Upload\n")
45 58 variationUpload(sheet, intern_number, upload_folder) variationUpload(sheet, intern_number, upload_folder)
 
... ... def main():
55 68 moveon = input("Continue(ENTER)") moveon = input("Continue(ENTER)")
56 69
57 70 print("\nGet a dataexport from the plentymarket site from the variation attributes, in order to access the current Variation ID.\n") print("\nGet a dataexport from the plentymarket site from the variation attributes, in order to access the current Variation ID.\n")
71
58 72 try: try:
59 73 export = askopenfilename(initialdir="../", export = askopenfilename(initialdir="../",
60 74 title="The Export File from Plentymarkets as .csv", title="The Export File from Plentymarkets as .csv",
 
... ... def main():
64 78 except Exception as exc: except Exception as exc:
65 79 print(exc) print(exc)
66 80 print("Something went wrong at the Export file import!") print("Something went wrong at the Export file import!")
81
67 82 print("spreadsheet csv containing the export : ", export) print("spreadsheet csv containing the export : ", export)
83
68 84 try: try:
69 85 print("Active, properties , features & price Upload") print("Active, properties , features & price Upload")
70 featureUpload(sheet, 'color_map', 1, upload_folder)
86 featureUpload(flatfile=sheet, feature='color_map', feature_id=1, folder=upload_folder)
87 featureUpload(flatfile=sheet, feature='item_name', feature_id=13, folder=upload_folder)
88 featureUpload(flatfile=sheet, feature='sleeve_type', feature_id=8, folder=upload_folder)
89 featureUpload(flatfile=sheet, feature='pattern_type', feature_id=11, folder=upload_folder)
90 featureUpload(flatfile=sheet, feature='collar_style', feature_id=12, folder=upload_folder)
71 91 setActive(sheet, export, upload_folder) setActive(sheet, export, upload_folder)
72 92 itemPropertyUpload(sheet, export, upload_folder) itemPropertyUpload(sheet, export, upload_folder)
73 93 priceUpload(sheet, export, upload_folder) priceUpload(sheet, export, upload_folder)
74 except FileNotFoundError as err:
94 except FileNotFoundError as err:# pylint:disable=invalid-name,used-before-assignment
75 95 print(err) print(err)
76 96 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") 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")
77 97 sys.exit() sys.exit()
98
78 99 print("\nOpen your amazon storage report and save it as an csv.\n") print("\nOpen your amazon storage report and save it as an csv.\n")
100
79 101 stocklist = askopenfilename(initialdir="../", stocklist = askopenfilename(initialdir="../",
80 102 title="The Stockreport from Amazon as .csv", title="The Stockreport from Amazon as .csv",
81 103 filetypes=[ ("csv files", "*.csv") ]) filetypes=[ ("csv files", "*.csv") ])
82 104 print("spreadsheet csv containing the FNSKU and ASIN : ", stocklist) print("spreadsheet csv containing the FNSKU and ASIN : ", stocklist)
83 105
84 106 EANUpload(sheet, export, stocklist, upload_folder) EANUpload(sheet, export, stocklist, upload_folder)
85 #stockUpload(sheet, stocklist)
86 107
87 108 print("\nCreate a upload file for the SKU and Parent_SKU\nto connect existing items from amazon to plentyMarkets.\n") print("\nCreate a upload file for the SKU and Parent_SKU\nto connect existing items from amazon to plentyMarkets.\n")
88 109
 
... ... def main():
97 118 asinUpload(export, stocklist, upload_folder) asinUpload(export, stocklist, upload_folder)
98 119
99 120 print("\nCollect the imagelinks from the flatfile, sorts them and assigns the variation ID.\n") print("\nCollect the imagelinks from the flatfile, sorts them and assigns the variation ID.\n")
121
100 122 try: try:
101 123 imageUpload(sheet, export, upload_folder) imageUpload(sheet, export, upload_folder)
102 124 except Exception as err: except Exception as err:
 
... ... def main():
111 133 print(err) print(err)
112 134 print("Market connection failed!") print("Market connection failed!")
113 135
114 # In case of new attributes uncomment and watch attribute_upload.py first
115 # try:
116 # attributeUpload(sheet)
117 # except:
118 # print("Attribute Upload failed!")
119
120
121 136 if __name__ == '__main__': if __name__ == '__main__':
122 137 main() main()
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