Differences between revisions 12 and 13
Revision 12 as of 2018-08-01 06:01:15
Size: 4318
Editor: sam
Comment:
Revision 13 as of 2018-08-01 06:04:30
Size: 4387
Editor: sam
Comment:
Deletions are marked like this. Additions are marked like this.
Line 73: Line 73:
note that -C is important it mean creating a new shop. after that the online shop should be populated. 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.

1, Installation.

install a blank woocommerce site.

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.

2, Configuration.

1, setup control to use woocommerce

  • coaad->page 2->"Online Store" set to 'W' stand for woocommerce. ignore all the other webshop related option in the same page its not needed in woocommerce

  • gencont->E-Commerce->"Location for webshop 1" set to the location that interface with woocommerce.

  • smaad->add a sales person then put it in brctrl->webshop location 1->online->"Online Store Salesperson"

  • draad->add a customer then put it in brctrl->webshop location 1->online->"Default Online Store Customer"

  • also fill in the "Online Transaction are orders of sales" and "Till number for online store payment" option in the same page.
  • put the woocommerce url with out any tailling '/' in to brctrl->webshop location 1->online->"Online Store Data source"

  • note that "Online Store URL" is not needed for woocmmerce but you can saftly copy it from "Online Store Data source"
  • "Online Image URL" is needed , it shoule be a URL allow read of child files from woocommerce site that link to $CCDIR/(comp_code)/images/
  • igrore "Online Store login name" and "Online Store login password" as they are not needed for woocommerce for detail see nest section
  • enter a " number of second before time out " if needed.
  • Magento related options on the same page can be ignored.

2, add woocommerce api key to grand control access.

  • first login to woocommerce site as admin then click the left hand side menu
  • woocommerce->setting

  • then click the
  • Advanced -> REST API

  • then click the "Add Key" button.
  • set the permission to Read/Write
  • then click the "Generate API Key" button it will bring you to a "Key Details" page.
  • open a file in $CCDIR/(company code)/woocomtoken/(branch code).token
  • copy the the "Customer key" field from the "Key Details" page into the token file.
  • then add a ':' after the customer key
  • after that copy the "Customer secret" field from the "Key Details" page into the token file after the ':'
  • so the whole file look like the following
  • customer_key:customer_secret
  • note that there are not end of line char.
  • save the file.
  • in the woocommerce wordpress->settigs->permalinks->choose post_name and save.

  • woocomerce->settings->generals->enable tax

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

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

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

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.

4, Receiving Orders.

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

  • create a NODEID for the importing and conset it to the company and the internet location.
  • place /u/ccr.15/std/binl/wcorder.cgi in a cgi directory that can access from woocommerce
  • first login to woocommerce site as admin then click the left hand side menu
  • woocommerce->setting

  • then click the
  • Advanced->Webhooks

  • chick the "Add Webhook" button
  • in the next page
  • give the webhook a name
  • set status as "Active"
  • set topic as "Order Created"
  • set the Delivery URL as the URL to the wcorder.cgi, with the NODEID as the QUERY_STRING

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

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