File packages/item_upload.py changed (mode: 100644) (index be45975..30d5d3b) |
... |
... |
def get_externalid(dataset, numberlist): |
480 |
480 |
return |
return |
481 |
481 |
|
|
482 |
482 |
try: |
try: |
483 |
|
extern_id = pandas.read_excel(numberlist['path']) |
|
|
483 |
|
extern_id = pandas.read_excel(numberlist) |
484 |
484 |
except xlrd.biffh.XLRDError as err: |
except xlrd.biffh.XLRDError as err: |
485 |
485 |
error.errorPrint( |
error.errorPrint( |
486 |
|
msg=str(f"..{numberlist['path'][-30:]} requires type [.xlsx]"), |
|
|
486 |
|
msg=str(f"..{numberlist[-30:]} requires type [.xlsx]"), |
487 |
487 |
err=err, linenumber=sys.exc_info()[2].tb_lineno) |
err=err, linenumber=sys.exc_info()[2].tb_lineno) |
488 |
488 |
if os.name == 'nt': |
if os.name == 'nt': |
489 |
489 |
print("press ENTER to continue..") |
print("press ENTER to continue..") |
File product_import.py changed (mode: 100644) (index e672def..8ea0200) |
... |
... |
def main(): |
36 |
36 |
features = {} |
features = {} |
37 |
37 |
category_id = {} |
category_id = {} |
38 |
38 |
sheet = {'path':'', 'encoding':''} |
sheet = {'path':'', 'encoding':''} |
39 |
|
intern_number = {'path':'', 'encoding':''} |
|
40 |
39 |
stocklist = {'path':'', 'encoding':''} |
stocklist = {'path':'', 'encoding':''} |
41 |
|
plenty_export = '' |
|
42 |
40 |
attributefile = {'path':'', 'encoding':''} |
attributefile = {'path':'', 'encoding':''} |
43 |
41 |
internnumber = {'path':'', 'encoding':''} |
internnumber = {'path':'', 'encoding':''} |
|
42 |
|
intern_number = '' |
|
43 |
|
plenty_export = '' |
44 |
44 |
step = 0 |
step = 0 |
45 |
45 |
|
|
46 |
46 |
root = tkinter.Tk() |
root = tkinter.Tk() |
|
... |
... |
def main(): |
71 |
71 |
input_folder = config['PATH']['data_folder'] |
input_folder = config['PATH']['data_folder'] |
72 |
72 |
attribute_date = config['PATH']['file_change_date'] |
attribute_date = config['PATH']['file_change_date'] |
73 |
73 |
attributefile['path'] = config['PATH']['attribute_file'] |
attributefile['path'] = config['PATH']['attribute_file'] |
74 |
|
internnumber['path'] = config['PATH']['internnumbers'] |
|
|
74 |
|
internnumber = config['PATH']['internnumbers'] |
75 |
75 |
plenty_export = config['PATH']['export_plentymarkets'] |
plenty_export = config['PATH']['export_plentymarkets'] |
76 |
76 |
|
|
77 |
77 |
if not plenty_export: |
if not plenty_export: |
|
... |
... |
def main(): |
94 |
94 |
config.write(configfile) |
config.write(configfile) |
95 |
95 |
|
|
96 |
96 |
# Initial start or invalid intern number file |
# Initial start or invalid intern number file |
97 |
|
if(not(internnumber['path']) or |
|
98 |
|
not os.path.exists(internnumber['path'])): |
|
99 |
|
internnumber['path'] = askopenfilename( |
|
|
97 |
|
if(not(internnumber) or |
|
98 |
|
not os.path.exists(internnumber)): |
|
99 |
|
internnumber = askopenfilename( |
100 |
100 |
initialdir=input_folder, title="Intern number list", |
initialdir=input_folder, title="Intern number list", |
101 |
101 |
filetypes=[ ("xlsx files", "*.xlsx") ]) |
filetypes=[ ("xlsx files", "*.xlsx") ]) |
102 |
|
internnumber = checkEncoding(internnumber) |
|
103 |
|
config['PATH']['intern_number'] = internnumber['path'] |
|
|
102 |
|
config['PATH']['intern_number'] = internnumber |
104 |
103 |
|
|
105 |
104 |
with open('config.ini', 'w') as configfile: |
with open('config.ini', 'w') as configfile: |
106 |
105 |
config.write(configfile) |
config.write(configfile) |
107 |
106 |
|
|
108 |
107 |
if not attributefile['encoding']: |
if not attributefile['encoding']: |
109 |
108 |
attributefile = checkEncoding(attributefile) |
attributefile = checkEncoding(attributefile) |
110 |
|
if not internnumber['encoding']: |
|
111 |
|
internnumber = checkEncoding(internnumber) |
|
112 |
109 |
|
|
113 |
110 |
features = assignFeatures(config=config) |
features = assignFeatures(config=config) |
114 |
111 |
if not features: |
if not features: |
|
... |
... |
def main(): |
252 |
249 |
file_name=ntpath.basename(sheet['path'])) |
file_name=ntpath.basename(sheet['path'])) |
253 |
250 |
except OSError as err: |
except OSError as err: |
254 |
251 |
print(err) |
print(err) |
255 |
|
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") |
|
|
252 |
|
print("Missing Data, need:\n* flatfile\n* stock numbers!\n") |
256 |
253 |
try: |
try: |
257 |
254 |
print("Property Upload") |
print("Property Upload") |
258 |
255 |
step += 1 |
step += 1 |
|
... |
... |
def main(): |
279 |
276 |
print(err) |
print(err) |
280 |
277 |
print("Missing Data, check if you have\n - a flatfile\n - a sheet with the stock numbers!\n") |
print("Missing Data, check if you have\n - a flatfile\n - a sheet with the stock numbers!\n") |
281 |
278 |
|
|
|
279 |
|
print('press ENTER to after the upload was successful') |
|
280 |
|
input() |
282 |
281 |
step += 1 |
step += 1 |
283 |
282 |
imageUpload(flatfile=sheet, |
imageUpload(flatfile=sheet, |
284 |
283 |
attributefile=attributefile, |
attributefile=attributefile, |