- Download the plugin file (myfreightshipping.zip) to your PC.
- Login to your website as WordPress Administrator.
- Backup the website.
- Go to the Plugins page and deactivate then delete any previous version of the Myfreight Shipping plugin.
- At the top of the Plugins page click Add New.
- At the top of the Add Plugins page click Upload Plugin.
- Browse to the zip file downloaded in step 1. Click and Open to upload.
- Click Install Now. The Myfreight Shipping plugin will be installed.
- Click Activate Plugin. You will then be returned to the Plugins page.
- Scroll to the plugin called Myfreight Shipping and click Settings. Alternatively, you can go to WooCommerce → Settings → Shipping and click Myfreight Shipping immediately below the Shipping tab.
- You will see the Myfreight/Myparcel Shipping settings page.
- Adjust the settings according to your needs (see Configurable Settings below for a description of the settings available).
- Note that Markups can be positive (to profit from shipping), or negative (to discount shipping).
- Default product weight and dimensions can be specified until actual product weights and dimensions are entered in the individual product shipping tabs.
- If you pack multiple products into a single container for shipping, refer to the Packing Settings section below for instructions on how to configure packing rules.
- Note that Account Type selection and API credentials entry are necessary for shipping pricing to display.
- Click Save Changes.
- Go to WooCommerce → Settings → General
- Complete the Store Address fields as the primary shipping collection address.
- Shipping location(s): Ship to specific countries only
- Ship to specific countries: Australia
- Enable taxes: As required
- Go to WooCommerce → Settings → Products → General
- Weight unit: kg
- Dimensions unit: cm
- Go to WooCommerce → Settings → Tax
- Confirm that required tax options and rates are applied to shipping (e.g. if GST to be applied, under Standard Tax Rates tick Shipping).
- Go to WooCommerce → Settings → Shipping → Shipping Classes
- Add a new shipping class called Fragile (use default slug).
- If you have a Myfreight account with dangerous goods enabled, add a new shipping class called Dangerous Goods (use default slug).
- Apply the new shipping classes to any products which are fragile (require manual handling during shipment) or contain dangerous goods/hazardous materials as appropriate.
- Disable any other WooCommerce shipping methods for Australian destinations to prevent extraneous shipping prices from displaying. You may leave certain shipping methods enabled, such as Free or Flat Rate shipping for orders over a certain $ amount, if required.
- Go to Appearance → Customize → WooCommerce → Checkout
- Phone field: Required (this is required for shipping if the optional Shipping Phone is not entered).
- Go to Products → All Products
- If the product shipping fields have not been completed, either:
- Edit each product and complete the fields in the Shipping tab, or
- Export all products (including custom meta data) to a CSV, complete shipping weight, dimension, class, packing, store and DG fields, and then Import the shipping fields (refer to the WooCommerce Product CSV Importer and Exporter documentation).
- If the product shipping fields have not been completed, either:
- The plugin should be ready to go. Shipping pricing will be shown at the bottom of the WooCommerce Cart and Checkout pages.
The following settings allow you to customise the plugin operation to suit your online store requirements.
Further instructions are provided on the settings page.
- Activate or de-activate components:
- Real-time Shipping Pricing.
- On Cart page and Checkout page.
- Address Entry Helper.
- On Cart page.
- On Checkout page.
- Auto consignment pre-fill upon successful order.
- Real-time Shipping Pricing.
- Address Accuracy Threshold %
- Extent of auto-correction applied to entered delivery addresses (suburb, state and postcode only). Default 80.
- Maximum Selections
- Number of shipping price options to display to customer. If set to 1 the customer is not given the option to select.
- Selection Display:
- Display Carrier to customer.
- Display Service to customer.
- Specify which carrier details to display.
- Markup to apply to shipping prices:
- Markup $ amount (positive or negative values accepted).
- Markup % increase (positive or negative values accepted). This is applied after the Markup $ amount.
- Option to round up ex GST amount to nearest dollar.
- Default Price
- Optional fallback shipping price in the rare event that the API is down.
- Default Item Weight
- Optional fallback weight where not specified for product (kg).
- Can be used for testing. It is advisable to clear this field once all products have their shipping weight assigned.
- Default Item Dimensions
- Optional fallback dimensions (length, width and height) where not specified for product (cm).
- Can be used for testing. It is advisable to clear these fields once all products have their shipping dimensions assigned.
- Packing Containers
- For combining multi-product orders into custom packing containers for shipping (e.g. wine bottles ordered individually will be packed into boxes for shipping).
- Packing Rule Activation.
- Allow packing rules to be applied to shipping pricing and ordering.
- Packing Rules.
- Enter packing rules in CSV (or tab delimited) format as described in the template provided.
- For rules to work, Packing Unit names must be applied in the Shipping tab for all products which are to be packed.
- Optional amounts to add to shipping prices under specific circumstances.
- These are only applied to carriers who use the surcharge and when the product is likely to attract this surcharge (e.g. fragile).
- Surcharge fields are to assist with predicting and applying transport carrier surcharges which may be applied in certain circumstances.
- As surcharges are not applied consistently by carriers, these values may need to be refined over time to suit your business and products shipped.
- Store/Warehouse Shipping Details
- Shipping contact information for primary store/warehouse.
- These fields complement the Store Address entered in the WooCommerce General Settings.
- Multi Store
- Used to activate multiple store location functions (for pricing and shipping).
- Default Store Code(s)
- Identify which stores/warehouses to use for pricing comparisons (except where specific store code(s) specified for products).
- Store Locations
- Enter list of all stores/warehouses including address and contact information in CSV (or tab delimited) format as described in the template provided.
- Account Type
- Indicate whether you have a Myfreight account (for high volume shippers) or a Myparcel account (for medium-low volume shippers).
- Myparcel Member ID
- Your account login identifier in Myparcel. Refer to the Myparcel WooCommerce Integration section of the Administrator Operation page for details on how to set up WooCommerce and Myparcel to work together. Note that Myfreight customers do not use this field.
- API Username and Password
- Required to access your Myfreight/Myparcel API for pricing and consignment/booking generation.
- Myfreight Customer Code
- Enter the customer site code provided by Myfreight. Note that Myparcel customers do not use this field.
- Myparcel Sync URL
- You must copy this to your Myparcel member profile in order to synchronise WooCommerce orders with Myparcel shipment bookings. Note that Myfreight customers do not use this field.
- Order Completed
- For Myparcel customers only, indicate whether an order should be removed from the pending shipments list when its status changes to Completed.
- Test Mode
- Activate test mode of operation which uses the test API. Note that Myparcel customers do not use this field unless requested to do so.
- Debug Logging
- Activate plugin debug message logging to WooCommerce logs.
If your online store sells products which are frequently packed into some sort of container for shipping, you will need to activate the Packing Rules setting.
Examples of when you might use packing rules are:
- Your online store sells bottles of wine individually, but you ship them in packing cases of varying sizes according to the number of bottles purchased.
- You sell hampers which contain a variety of items selectable by the customer. The size and weight of the hamper to be shipped depends upon how many items are selected and what their combined weight is (plus the weight of the hamper itself).
- You sell T-Shirts, and if 3 or less are purchased you ship them in a satchel, but if more are purchased you ship them in a box.
- You sell various pumps which are shipped individually in cartons. But if more than 2 are sold in an order you ship them on a skid or pallet. e.g. If 3 - 4 are ordered you ship them on a skid. If 5 - 9 are ordered you ship them on a pallet in a single layer. If 10 - 18 are ordered, you ship them on a pallet stacked 2 layers high.
Note that you are not limited to one packing rule, and can have multiple different packing rules being applied to products in a single order.
The first thing you need to know is what packing containers are available for shipping, their weight and dimensions, and how they are used. Define a "container code" for each - an alpha-numeric word including dashes and underscores (e.g. "dozen-bottle-box").
Next, all product types which may be packed into a container should be given a "packing unit" type - an alpha-numeric-dash-underscore word defined by you to designate the category of products to be similarly packed (e.g. "bottle"). Enter the "packing unit" word into the product's Shipping tab in the "Packing unit" field.
Then determine minimum and maximum numbers of each product (designated by a packing unit) which can be packed into each container type (designated by a container code).
Finally, open and edit the packing rules CSV template file to suit your packing requirements. When you are finished, click and drag to select the table cells, copy and paste them into the "Packing Rules" field in the Myfreight Shipping settings page, ensuring any previous information is removed. Tick the Packing Rules Activation tickbox and click the Save changes button at the bottom. You will notice that the "Packing Rules" field has now stored your rules in a different format (JSON).
Some hints for changing the packing rules CSV template file:
- Do not change the header cells for columns A - G (highlighted blue below).
- Change the header cells for columns H onwards to be the "packing unit" name(s) you defined above.
- Insert your "container code" name(s) defined above into column A ("container_code") from row 2.
- Column B ("item_type") must contain Myfreight or Myparcel item types only (e.g. Satchel, Carton, Skid, Pallet, etc.).
- Insert the empty container weights (in kgs) and dimensions (in cm) into columns C - F.
- Column G ("container_max_empty_slots") is the difference between the maximum and minimum packing units per container type determined above.
- Column H onwards contains the maximum number of packing units (specified at top of column) which can be packed into the container type.
- Note that there can be multiple rules for each container code, and for each packing unit, to describe all the packing variations.
After the CSV table has been pasted into the "Packing Rules" field, saved and converted to JSON, you can make changes either by repeating the process above, or editing the JSON within the field directly. Be careful to retain the JSON syntax, and include a comma at the end of each line except the last line of a section.
Be sure to test the pricing and consigning of various combinations of packable products being ordered. To check that the rules are working as intended, you can see which container(s) have been selected using either of two methods:
- Select products in the shop and complete a full Checkout. Go to Myfreight or Myparcel (as described in the Administrator Operation section) to view the consignment/booking and check that the item types selected for shipping are as expected. Ensure that shipping item weights are the aggregate of the container weight and the product weights packed therein.
- At the bottom of the settings page, tick the "Enable Debug Logging" tickbox. Select products in the shop and either view the Cart page (to calculate shipping price), or complete a full Checkout. Then back at the bottom of the settings page, click the "View Log" link. The current WooCommerce debug log will open. Scroll to the bottom to see the packing process dialogue and confirm it is calculating the shipping packing as expected. Remember to disable debug logging prior to live operation, as performance may be affected.