Configure config.ini
and fill up the sections for Lazada, Opencart, WooCommerce and Shopee.
-
Install docker
-
Run the app:
- Make:
make docker-run ARGS="--help"
- Bash:
./scripts/docker_run --help
- Make:
- Setup and put your credentials in
config.ini
file. To disable a system, just comment it out in the.ini
file.
[Common]
Store=../skeo_sync.db
DefaultSystem=Opencart
EnableLazadaToShopeeUpload=1
[Lazada]
Domain=
AppKey=
AppSecret=
[Shopee]
ShopID=
PartnerID=
PartnerKey=
[Opencart]
Domain=
Username=
Password=
[WooCommerce]
Domain=
ConsumerKey=
ConsumerSecret=
- Run with make, which will install pypy and pip and requirements.txt
# For testing and check config only.
$ make pypy3-run ARGS="chkconfig"
# For syncing in read-only mode (no write).
$ make pypy3-run ARGS="sync --readonly"
# For syncing using a different config.
$ make pypy3-run ARGS="sync --config=config.prod.ini"
Use black
formatter please.
You need to refresh your app's authorization to your shop. Check out the Shopee Open Platform Docs on how to setup Shop Authorization.
There's a script included here to generate the URL that you need to visit:
$ make pypy3-run ARGS="shreauth --config=config.prod.ini"
- Open you app on the APP Console
- In
App Management > Auth Management
, add your authorized seller whitelist. - Open this link to redirect to your seller authorization:
Replace
https://auth.lazada.com/oauth/authorize?response_type=code&force_auth=true&redirect_uri=${app call back url}&client_id=${appkey}
${app_call_back_url}
and${appkey}
respectively. - Authorize and take note of the redirected URL and get the
code
part. For example:https://127.0.0.1/?code=0_xxxxxxxxxxxx
- Run the following:
$ make pypy3-run ARGS="lzreauth --config=config.prod.ini --token=0_xxxxxxxxxxxx"
As of Feb 2021, using the update endpoint sometimes will not work if the quantity is set to something lower than an arbitrary number. This number is of unknown origin. Real great.
Update from Mar 2021: Lazada Open API support replied to our query and said that this was a known issue and escalated to the regional support. 🥳 Now we wait.
Workarounds
- Manual quantity changes should only be made in Lazada; or
- Distribute quantity changes in Lazada and another system (e.g 50 in Lazada, 50 in Opencart = 100)