Plugin Directory

Changeset 3368136


Ignore:
Timestamp:
09/26/2025 01:18:08 AM (6 months ago)
Author:
freightexchange
Message:

Added the checks to stop calling the API if the destination postcode and suburb is missing

Location:
freightexchange/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • freightexchange/trunk/freight-exchange.php

    r2978036 r3368136  
    1919}
    2020if ( ! defined( 'FX_API_URL' ) ) {
    21     define("FX_API_URL",'https://portal-api.freightexchange.com.au/portal/api/v2/quote');
     21    define("FX_API_URL",'https://api.freightexchange.com.au/portal/api/v2/quote');
    2222}
    2323
     
    224224                // get shipping rates
    225225                public function freightexchange_api( $package, $saved_quoteId ) {
    226                    
     226                    $response_data = array();
    227227                    if ( empty( $package ) ) {
    228228                        return array();
     
    359359                    }
    360360                    fe_error_log($log_msg);
    361                    
     361                    if ( ! empty( $destination['city']) and ! empty( $destination['postcode'])) {
    362362                    $response_hooks = wp_remote_request( $send_url, array(
    363363                        'method'    => $api_method,
     
    372372                   
    373373                    $response_code = wp_remote_retrieve_response_code( $response_hooks );
    374                     $response_data = array();
     374                   
    375375                   
    376376                    if( 200 == $response_code ){
     
    385385                        fe_error_log( $log_msg );
    386386                    }
    387                    
     387                    }   
    388388                    return $response_data;
    389389                }
     390               
    390391            }
    391392        }
  • freightexchange/trunk/readme.txt

    r3326052 r3368136  
    44Tags: Freight Exchange,shopping
    55Requires at least: 4.7
    6 Tested up to: 6.7
     6Tested up to: 6.3
    77Requires PHP: 7.3
    88Stable tag: 1.8.11
     
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html
    1111
    12 FreightExchange WooCommerce Shipping Plugin
    13 == Multi-Carrier Shipping ==
     12== Description ==
     13= Accurate shipping quotes for pallets, cartons & satchels. Instant bookings with great carriers. =
    1414
    15 FreightExchange WooCommerce Shipping Plugin
     15FreightExchange gives you instant access to multiple pallet & carton carriers so that you can automate order quoting and dispatch across all of your your stores, warehouses and brands. FreightExchange makes it easy for your business to save time and money when shipping bulky goods. With branded tracking notifications, same day shipping support, we help you fulfil orders faster with our simple, intuitive shipping platform.
    1616
     17* Accurate, instant quotes at check-out, no matter how bulky your goods
     18
     19* Discounted rates with leading pallet & carton carriers, out of the box
     20
     21* One-click labels and shipping documents
    1722== Installation ==
     23
     24= Installation Overview =
    1825 
    19 1. Upload the plugin folder to your /wp-content/plugins/folder.
    20 2. Go to the **Plugins** page and activate the plugin.
     26Before installing this plugin you should have the following information handy:
     27
     28* Signup on FreightExchange shipping platform.
     29* API Key from FreightExchange shipping platform.
     30
     31= Install and activate the plugin =
     32* In your WordPress dashboard, go to Plugins => Add New. Search for “FreightExchange”, and click Install Now.
     33After the installation process completes, click the Activate Plugin link to activate the plugin.
     34* Once the installation is done, FreightExchange will appear under WooCommerce > Settings > Shipping > FreightExchange.
     35* Under FreightExchange, please set the following:
     36    1. Check the "Enable" chckbox. It will start showing the LIVE rates from FreightExchange platform to the customers.
     37    2. Paste the API Key which was generated by FreightExchange platform.
     38    3. Check the "Enable" checkbox for "Show Prices Inclusive of GST".
     39    4. Enter the Origin Contact Name, in order to make bookings, we need to send a contact name of a person at the origin address to the carriers.
     40    5. Enter the Origin Phone Number, in order to make bookings, we need to send a phone number of a person at the origin address to the carriers, this can be either a phone number of landline.
     41    6. Freight Cost (Default), backup flat shipping cost shown to customers when the quote request to FreightExchange fails due to some reason.
     42    7. Markup / Shipment as %, make money on shipping by adding a percentage markup on freight cost send back from FreightExchange. If we sent back $10 via API and you have said 20% markup, we will show the shipping cost as $12 in the checkout screen. This can be used together with the fixed markup.
     43    8. Markup / Shipment as $, Make money on shipping by adding a fixed markup on freight cost send back from FreightExchange. If we sent back $10 via API and you have said $5 markup, we will show the shipping cost as $15 in the checkout screen. This can be used together with the percentage markup.
     44    9. Exclude rates for Shipping class, slug for the shipping class for which you don't want to show the rates from FreightExchange. If the product belongs the mentioned Shipping class and only that product is ordered than the FreightExchange rates will not be displayed, but if the product is ordered with another product which needs the LIVE rates than the FreightExchange rates will be displayed.
     45* Go to Settings > Shipping > Shipping options and uncheck the "Enable dubug mode" for "Debug mode" option. If this is checked then the rates will keep on recalculating and customers will be unable to proceed.
     46* Go to Settings > Tax > Tax options and select "Yes, I will enter prices inclusive of tax" for the option "Prices entered with tax".
     47* Go to Settings > Tax > Standard rates and make sure that the shipping is unchecked, as the rates returned by FreightExchange are inclusive of GST.
     48
     49You can also refer to the document [Connect WooCommerce Store](https://help.freightexchange.com.au/support/solutions/articles/47001245737-connect-woocommerce-store)
    2150
    2251== Frequently Asked Questions ==
     
    27562. How to uninstall the plugin?
    2857   Simply deactivate plugin and delete it.
     58   
     593. I don't want to display FreightExchange quotes at the checkout. Can I do that?
     60   Yes! Whether you display rates at the checkout, the orders details will still be imported to the FreightExchange system for dispatch.
     61
     624. I want to offer customers the option of collecting items from my physical store. Can I do that with your plugins?
     63   Yes! Most online eCommerce systems give you the option of offering customers a Click and Collect service, in addition to offering accurate freight quotes from the FreightExchange plugins.
     64
     655. I don't want to show FreightExchange rates at the checkout for certain products, can I do that?
     66   Yes! Most online eCommerce systems allow you to set up rules to quote for freight on different products.
     67
     686. I mostly ship to residential addresses. Can I get accurate quotes and avoid extra charges?
     69   Yes! Our plugins allow you to configure the default delivery location settings, so that you always quote for a residential delivery.
     70
     717. I mostly need tail lift deliveries. Can I get accurate quotes and avoid extra charges?
     72   Yes! Our plugins allow you to configure the default delivery service settings, so that you always quote for a tail gate delivery service.
     73
     748. If there is a FreightExchange quote that comes through at the checkout that is too high or needs to be adjusted can we do that?
     75   Every order that gets placed and imported to FreightExchange can be edited or deleted. It is only when you print the labels (in FreightExchange) that payment is required.
     76
     779. Does the FreightExchange payment apply when the customer selects the freight service at the checkout of my store?
     78   No. It is only when you print the labels from FreightExchange that payment is required.
     79
     8010. I have the Australia Post / Sendle / Shippit plugin installed on my store. Who's rates will appear at the checkout?
     81    You can manually choose which plugins provide rates at the checkout on stores on most eCommerce platforms.
     82
     8311. Can I ship orders internationally with FreightExchange?
     84    No. We only support domestic shipping at this point in time.
     85
     8612. Can I ship DG orders with FreightExchange?
     87    Yes. We support DG shipping.
     88
     8913. Can I put a mark up on my freight.
     90    Certainly. You can add a mark up in percentage or any fixed amount if you want to.
     91
     9214. Can I have more than 1 freight plugin running in my WooCommerce?
     93    As of the moment, you can't use other plugins with our FreightExchange plugin.   
    2994 
    3095== Changelog ==
     
    411062023.09.05 - Version 1.8.11
    42107 * Tweak - Allowed Local Pickup Shipping options to be available always
     108 
     1092025.09.26 - Version 1.8.12
     110 * Tweak - Added the checks to stop calling the API if the destination postcode and suburb is missing
     111
     112 
     113== Screenshots ==
     114screenshot-1.png
     115screenshot-2.png
     116screenshot-3.png
     117screenshot-4.png
     118screenshot-5.png
Note: See TracChangeset for help on using the changeset viewer.