1, Installation.

install a blank woocommerce site. On centos machines all that's needed is:

yum install wordpress

go to the woocommerce site and sign up for a new account. Once you have the download link do the following:

cd /usr/share/wordpress/wp-content/plugins
wget -O woocommerce.zip <link for the download>
unzip woocommerce.zip
rm woocommerce.zip

depending on network , may need to install the following plugin to enable woocommerce to pull images from control.

https://github.com/UCF/WP-Allowed-Hosts

need to add the the images url to the allowed host. You also need to add the Webhook host here if different (comma separated)

2, Configuration.

1, setup control to use woocommerce

2, add woocommerce api key to grand control access.

3, Dumping Data.

making sure online id on different master is clean

clean debtor online_id drcidrep

clean cat onine_id catrep->E (note left the "set show online" field blank it will not touch it on the stock record)

copy a clean dblog.dat to company

run binl

fdb2log -c37 -a23 -a22 -a47

37 is for stcont 23 is for branch 22 for colour and 47 for size. woocommerce api allow update colour size and taxs informations

then run binl

fdb2log -Bbrcode -a8 -a9

-B for only the stock and category in internet location , also note that 8 is for cateogry which come before 9 for stock.

then run binl

log2woocom -C

note that -C is important it mean creating a new shop i will blank out any online_id in control before creation of records. after that the online shop should be populated.

If you get nothing inside woocommerce, check the tax in WooCommerce->settings->tax. You should see Code xx rates. If these are missing, check the allowed hosts setting. Would also help to turn on debugging in Wordpress:

in the wp-config.php, uncomment/add the following 2 lines:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);

You will find woocommerce logs in

<wordpress_home>/wp-content/uploads/wc-logs

4, Receiving Orders.

woocommerce have web hook ability, control will utilise this to import order from woocomerce so it will appear seamlessly and instantly.

example:

https://www.company.com/cgi-bin/wcorder.cgi?INTERNETDEV

after that every time order created in woocommerce will get imported into control instantly.

5, On Going

log2woocom needed to be constant running

to debug set evn var WOOCOM_TRACE_XML = 1

to retrieve an existing order that didnt come in.

curl -k https://server/wp-json/wc/v2/orders/533 -u$(cat /u/ccr.15/COMP/woocomtoken/WARE.token) | /binl/wcorder.cgi

woocommerce (last edited 2018-10-04 00:24:02 by fuzzy)