fttx / barcode-to-pc-server

Barcode to PC server
https://barcodetopc.com/
GNU General Public License v3.0
207 stars 85 forks source link

Add WooCommerce integration #337

Closed fttx closed 2 years ago

fttx commented 3 years ago

Current way

Example output template (Update order status): example.zip

New way:

1 2

Field types: action: select, fields: [{ion-text, ion-text}], auth: ion-text

Supported requests:

Product

Order

Docs: https://woocommerce.github.io/woocommerce-rest-api-docs/

Example

Output template to Add a product to an order:

[BARCODE label="Scan the order #"] [BARCODE label="Scan the product ID"] [WOO_COMMERCE action="order_update" key="id" value="barcode[0]", key="line_items" value="[{ id: barcode[1]}]" ]

gitschwarz commented 2 years ago

Woocommere has a simple console client. All this features are fast to program. A simple Script and the Run-command from barcode-to-pc are the trick: Example update stock: wp --url=url-webshop --path=path-webshop --user=www-data wc product update ARTICLES_ID --stock_quantity=NEW-STOCK

You find the wp-cli (Debian) under: /usr/share/wordpress/cli/ This can run local or through ssh ...

fttx commented 2 years ago

WooCommerce support is now available, could you please test it?

image

You can pass barcodes in the fields using this syntax: {{ barcode }}

Download app: app-debug.apk.zip Download server: https://ci.appveyor.com/api/buildjobs/58td327np763utmg/artifacts/dist%2Fdist%2Fbarcode-to-pc-server.offline-installer.zip (unzip everything in the same folder)

TODO:

gitschwarz commented 2 years ago

Sorry - no Windows :-) and the way with bash scripts make more fun and is faster .-) So: No way to test Greetings