Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.
/ oclz Public archive

Opencart - Lazada - Shopee - WooCommerce - Tiktok item syncing

License

Notifications You must be signed in to change notification settings

nmcapule/oclz

Repository files navigation

SKEO Opencart-Lazada-Shopee-WooCommerce Extension Accessory

Setup

Configure config.ini and fill up the sections for Lazada, Opencart, WooCommerce and Shopee.

Environment

Using docker setup

  1. Install docker

  2. Run the app:

    • Make: make docker-run ARGS="--help"
    • Bash: ./scripts/docker_run --help

Using local machine setup

  1. 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=
  1. 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"

Formatter

Use black formatter please.

Troubleshooting

I got an error when syncing Shopee: your access to shop has expired. What do?

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"

How do I get / setup the access and refresh tokens for Lazada?

  1. Open you app on the APP Console
  2. In App Management > Auth Management, add your authorized seller whitelist.
  3. Open this link to redirect to your seller authorization:
    https://auth.lazada.com/oauth/authorize?response_type=code&force_auth=true&redirect_uri=${app call back url}&client_id=${appkey}
    
    Replace ${app_call_back_url} and ${appkey} respectively.
  4. Authorize and take note of the redirected URL and get the code part. For example:
    https://127.0.0.1/?code=0_xxxxxxxxxxxx
    
  5. Run the following:
    $ make pypy3-run ARGS="lzreauth --config=config.prod.ini --token=0_xxxxxxxxxxxx"

My Lazada item stocks does not update?

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

  1. Manual quantity changes should only be made in Lazada; or
  2. Distribute quantity changes in Lazada and another system (e.g 50 in Lazada, 50 in Opencart = 100)

About

Opencart - Lazada - Shopee - WooCommerce - Tiktok item syncing

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages