ShipRush

PHP Webstore Setup and Troubleshooting

Setting Up PHP Toolkit-Based Web Stores

Click here to display the list of the PHP toolkit-based webstores.

  1. Go to SETTINGS, and then click Add Web Store (top of screen). The Web Store Configuration dialog is displayed.

  2. Select a webstore by clicking its icon or selecting an option in the Select a Web Store dropdown. Click Next.

  3. Choose the option that best suites your situation:

    1. MY WEBSTORE IS CONFIGURED!: If you have direct FTP access to your host server, choose this option. Then enter the Web Store Name, Web Store URL, and Access Token.

    2. DOWNLOAD XXX PLUGIN: (The button shows the name of the webstore, replacing XXX.) This option downloads a .zip file, containing the PHP files to manually upload to your webstore's host.

    If you used MY WEBSTORE IS CONFIGURED, the initial setup is complete. Continue at testing and configuring your webstore setup.
    If you downloaded the PHP Tookit for manual installation, continue with the following steps.

  4. Extract the contents of the PHP Tookit's .zip file into a folder of your choosing.

  5. Read the README-PLEASE.txt file.

  6. Open the ShippingZSettings.php file, and follow the instructions.

  7. Once you complete the previous steps, review the "Only for XXX Users" section of the php file (where XXX is your Web Store), and make any necessary changes. Save the file.

  8. Upload your PHP files to the root directory of your e-commerce system.

  9. Click My Web Store is Configured! (at bottom of the Web Store settings page).

Upgrading the Webstore's PHP Toolkit

To upgrade the webstore's PHP toolkit:

  1. On the main menu (at left), click WEB STORES. Your list of webstores is displayed.

  2. Click the webstore's edit link (at far right).The Edit Web Store page is displayed. The fields and options in the Edit Web Store window vary, depending on the selected webstore.

  3. Depending on the selected webstore, one or both of these options may be available:

  • Download XXX plugin: (Replace XXX with the name of the webstore). This option downloads a .zip file that contains the PHP files to manually upload to your webstore's host.

  • Upgrade PHP plugin: This option displays another page where you can enter your FTP credentials, and have the files uploaded directly to your FTP. The page may include both the Upgrade and Download plugin command options.

Note: See also updating the PHP.

Testing the PHP Toolkit Web Store

Once the PHP Toolkit is set up and deployed to your e-commerce system, you can begin testing by ensuring that no errors are returned when retrieving orders from your e-commerce system. To test the webstore:

  1. On the main menu (at left), click WEB STORES. Your list of webstores is displayed.

  2. Click the webstore's edit link (at far right).The Edit Web Store page is displayed. The fields and options on the Edit Web Store vary, depending on the selected webstore.

  3. Click Refresh.

  4. At the bottom of the window, you should see the message "Retrieving orders momentarily...". If this is successful, this message will then be displayed: Order download finished 1 min ago. XX order(s) downloaded.

Debugging the PHP Toolkit Web Store

In order to run tests, you need your Web Store URL and Access Token from your PHP Web Store. This information is found by clicking WEB STORES (in the main menu at left), and then clicking edit at right of the webstore in the list. You will also need to know the names of the PHP files that were uploaded to your e-commerce host.

  • Web Store URL is referenced as [URL]

  • ShippingZXX.php (where XX is the web store type, (e.g., ShippingZWoo.php) is referenced as [ShippingZFile]

  • Access Token is referenced as [TOKEN]

Testing Connectivity to the PHP Web Store

To confirm access to PHP via a web browser, you need some of the information gathered in earlier steps. The information will create a URL from the Web Store URL [URL] and the ShippingZXX.php file [ShippingZFile].

Do the following:

  1. Take the values noted from your webstore settings and put them together as follows: [URL]/[ShippingZFile].(e.g., http://www.yoursite.com/ShippingZMagento.php)

  2. Paste the above into a web browser. If the file is configured correctly and accessible, a screen similar to this one should be displayed:

Note: If the above page is not displayed, then an issue exists with accessing the file that may involve permissions or other issues. Review the ShippingZSettings.php file, and ensure that the files are in the appropriate directory with the appropriate, assigned permissions. If you make changes, re-run this connectivity test.

When accessing this URL in the browser, you should always receive a response.

Validating the Shipping Token

Using the URL (directing to the [ShippingZFile]) from the previous section), you can append various parameters to the URL for testing:

  1. Append your [TOKEN] value to your URL to see the available commands. The format of adding the token is:

[URL]/[ShippingZFile]?shipping_access_token=[TOKEN]

Example: https://www.fakesite.com/ShippingZWoo.php?shipping_access_token=12345678901234567890123456)

  1. Enter the new URL into your web browser. If you have provided a valid token value, you are presented with a page advising that you have entered an "Invalid Command" followed by a listing of valid commands:

  2. Next, you will use the ping command to confirm database access. Append the URL that you just used with &cmd=ping. The format of the URL is shown below.

[URL]/[ShippingZFile]?shipping_access_token=[TOKEN]&cmd=[COMMAND], where [COMMAND] is one of the commands listed on the previous page.

Another example: https://www.fakesite.com/ShippingZWoo.php?shipping_access_token=12345678901234567890123456&cmd=ping.

If the information entered is valid, you should see a page that states: "Access token database access verified."

Checking for Available Orders

If no orders are being brought into Descartes ShipRush Web, and your PHP Web store is connected without issues, you can test for orders that are available to the PHP toolkit.

Use the "getordersbydate" command to perform this text. This command requires two additional parameters: datefrom and dateto. These parameters are date values in the format of YYYY-MM-DDThh:mm:ssZ (e.g., 2019-06-26T01:00:01Z indicates June 6th, 2019 at 01:00:01AM Zulu time).

Tip: Zulu time is the same as Greenwich Mean Time (GMT).

  1. Use this full URL format:

[URL]/[ShippingZFile]?shipping_access_token=[TOKEN]&cmd=[COMMAND]&datefrom=[datefrom]&dateto=[dateto]

For example: https://www.fakesite.com/ShippingZWoo.php?

shipping_access_token=12345678901234567890123456&cmd=getordersbydate&datefrom=2019-06-26T00:00:01Z&dateto=2019-06-26T23:59:59Z

If your URL is correct and the PHP Web store is functional, you should obtain one of two results:

  • Result One: No orders found

  • Result Two: Orders found

Back to Top