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)
Function description priceUpload 2c5735f4f4c79607f55c77b1359aa5984d1e6699 Sebastian Fricke 2020-04-23 09:34:30
similar attribute search regardless of the parent 4bb0970408d78d25264d479428fe8c3389483215 Sebastian Fricke 2020-04-23 09:28:19
Fix marking dropdown bug 0d1695083d2b4e49fd364a36a7ef3c92a192d62f Sebastian Fricke 2020-04-23 09:26:46
update desktop specific build script for windows 8a6536d6173f7383022fab92f234ab25fc81204b Sebastian Fricke 2020-04-22 10:15:05
Refactor config handling a9be950a4e8d97fa97c7e9caff33fcbb1f476d9d Sebastian Fricke 2020-04-22 10:11:57
Fix gui/category_chooser: file change bug 9879e65c9aad9b1feb05b6121a0e33c129a8beb5 Sebastian Fricke 2020-04-22 10:09:36
update .gitignore 6c7628af605a72ced1e146c27da8639225ab9c6c Sebastian Fricke 2020-04-22 10:08:47
Fix error.py: Fix colorful messages on windows 31f0b106c7aee1962bba3efb5758f647170eceff Sebastian Fricke 2020-04-22 10:07:30
Enhanced error output to extra module dda37a22d21db1af6330fd62395682b91f46f5ec Sebastian Fricke 2020-01-27 10:56:00
Introduction infoPrint, removed unnecessary parameter 98b6779f95fcf6d3350f64e7d2a8151932415458 Sebastian Fricke 2020-01-16 14:27:15
Add Cdiscount price & coding style review 7c5451b067760100904aed947b2ba484ab9c9e45 Sebastian Fricke 2020-01-16 14:25:15
coding style, naming conventions & uninitialized 218378ca191510dc2092108a87e63ff83b4c6b31 Sebastian Fricke 2020-01-16 13:58:24
coding style & cleanup image upload module 04ac13fb764baecd1a419cbffcd9696a3ff5b680 Sebastian Fricke 2020-01-16 13:56:07
coding style improvements and colorful error msg 401db811c0edd62b14c7a0a29e2c1f6d2791774c Sebastian Fricke 2020-01-16 13:54:25
code cleanup and coding style category.py b1e41b45fe405d3826a9b6e452fb9e2f9f6697bf Sebastian Fricke 2020-01-16 10:43:44
Added the category config to the gitignore file b8b522d9ade4b59b5d0a0bd4f9b7c79e8db334c6 Sebastian Fricke 2020-01-15 14:56:06
Removed log function for category_config(not needed) c8ca8a3b6b968f1835697073e7d5fe1ea70b15ba Sebastian Fricke 2020-01-15 14:54:15
Added category_config functionality 7bd8256398b4af5c1feb3033d74cd9f29b047edc Sebastian Fricke 2020-01-15 14:53:20
improved error handling & adjusted names to naming convention cfcd91090a2598c6c51576bcdd53e03ab6c2f59b Sebastian Fricke 2020-01-15 14:47:42
Refactor CategoryChooser 562e6657c6fef89d0584731e54325cec013268a7 Sebastian Fricke 2020-01-15 14:42:11
Commit 2c5735f4f4c79607f55c77b1359aa5984d1e6699 - Function description priceUpload
Add a function description to the priceUpload function
update some of the comments
Add a missing module name to the infoPrint function.
Author: Sebastian Fricke
Author date (UTC): 2020-04-23 09:34
Committer name: Sebastian Fricke
Committer date (UTC): 2020-04-23 09:34
Parent(s): 4bb0970408d78d25264d479428fe8c3389483215
Signing key:
Tree: 1b0821e049e376bf9e5b7ff0d8b897ee950fba72
File Lines added Lines deleted
packages/price_upload.py 17 5
File packages/price_upload.py changed (mode: 100644) (index b901adf..654338e)
... ... from packages import error
5 5
6 6
7 7 def priceUpload(flatfile): def priceUpload(flatfile):
8 # The column header names for the output
8 """
9 Parameter:
10 flatfile [Dictionary] => path and encoding as strings
11 of the flatfile
12
13 Description:
14 Take the standard_price field from the flatfile and apply
15 price calculation rules to set the price values for different
16 markets.
17
18 Return:
19 data => Ordered dictionary with of the variation with
20 'column_names' as fields
21 """
22
9 23 column_names = ['price', 'ebay', 'amazon', 'webshop', 'etsy'] column_names = ['price', 'ebay', 'amazon', 'webshop', 'etsy']
10 24
11 25 prices = { prices = {
 
... ... def priceUpload(flatfile):
17 31 'cdiscount':{'id':'7', 'value':''} 'cdiscount':{'id':'7', 'value':''}
18 32 } }
19 33
20 # create a data Dictionary and fill it with the necessary values from the
21 # flatfile
22 34 data = OrderedDict() data = OrderedDict()
23 35 standard_price = 0 standard_price = 0
24 36 variation_price = 0 variation_price = 0
 
... ... def priceUpload(flatfile):
29 41 with open(flatfile['path'], mode='r', encoding=flatfile['encoding']) as item: with open(flatfile['path'], mode='r', encoding=flatfile['encoding']) as item:
30 42 reader = DictReader(item, delimiter=";") reader = DictReader(item, delimiter=";")
31 43 for row in reader: for row in reader:
32 # Make sure that there is price even at parents
44 # Take a price from a variation in case the parent does not own one
33 45 if not row['standard_price']: if not row['standard_price']:
34 46 error.warnPrint( error.warnPrint(
35 47 msg=f"row:{row['item_sku']} doesnt have a price!", msg=f"row:{row['item_sku']} doesnt have a price!",
 
... ... def priceUpload(flatfile):
40 52 if scndrow['parent_child'] == 'child' and\ if scndrow['parent_child'] == 'child' and\
41 53 scndrow['standard_price'] and\ scndrow['standard_price'] and\
42 54 row['item_sku'] == scndrow['parent_sku']: row['item_sku'] == scndrow['parent_sku']:
43 infoPrint(
55 error.infoPrint(
44 56 "parent without price add:{0} from:{1} to:{2}" "parent without price add:{0} from:{1} to:{2}"
45 57 .format(scndrow['standard_price'], .format(scndrow['standard_price'],
46 58 scndrow['item_sku'], scndrow['item_sku'],
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