| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Australia Post - Automatic Order 'Completion' when Delivered | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Australia Post - Automatic Order 'Completion' when Delivered
Hi guys,
I've developed a short PHP script that will automatically changed an order status from QUEUED or PROCESSED to COMPLETE once the package has been delivered to the customer. Note that it will not send an email to the customer or you (if you have that configured). PRE-REQUISITES TO WORK: You must enter your Australia Post shipping number in the Tracking number field on the order page. The script not only automatically updates your order status, but can be loaded in your webbrowser to see a shipping summary: http://s2.postimg.org/9t6lc5w7t/Screen_Shot_2013_04_14_at_6_16_44_PM.png Code:
Once you have put the file there and edited it to have your database name, database username and password, you have to configure a CRON JOB to run every 30 minutes. In cPanel this is down the bottom under the advanced tab. 1> Click on CRONJOBS 2> Under ADD NEW CRONJOB, select the COMMON SETTINGS dropbox and choose "Twice an hour". 3> In the COMMAND text entry field, type the following: php -f /home/<USERNAME>/public_html/AP-Delivery.php >/dev/null 2>&1 Where the username is your cPanel username. The script will run every half hour. It will look for orders that have a TRACKING NUMBER and have a status of PROCESSED or QUEUED. It will go to the Australia Post website and check whether the order has been delivered. If it has, it will (directly by accessing the back end database) change the status to COMPLETE. To load the shipping summary, just go to https://yourdomain.com//AP-Delivery.php Hope this helps.
__________________
X-Cart Gold 4.6.1 |
|||||||||
#2
|
|||||||
|
|||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
That's awesome. I wish someone would develop something like this for USPS and UPS!
__________________
X-Cart Classic 4.4.X |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
Does UPS have a website where you enter a tracking number? I could probably alter the code reasonably quickly [when I have the spare time]
__________________
X-Cart Gold 4.6.1 |
|||||||||
#4
|
|||||||
|
|||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
__________________
X-Cart Classic 4.4.X |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
Can you provide me with a recent tracking number (or one you've just shipped)?
If you prefer you can private message me with the details. I need to look at the format of the output
__________________
X-Cart Gold 4.6.1 |
|||||||||
#6
|
|||||||
|
|||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
9405510200829774216112
__________________
X-Cart Classic 4.4.X |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Australia Post - Automatic Order 'Completion' when Delivered
ok.. I understand that this isn't a complete modification however I'd appreciate some latitude from the moderators!
ok.. Here is where I'm at. Please note the following: 1> It won't yet change the order to COMPLETE as the example tracking item hasn't been delivered yet (therefore I don't know what the delivered text looks like!) 2> I've disabled the part of the code that automatically sends an e-mail to the customer when the order tracking number is entered [so that whilst testing it doesn't spam them!] Here is where I'm at. Follow the instructions in the first post. Perhaps you could call this USPS-Delivery.php and place it in your www directory. Code:
__________________
X-Cart Gold 4.6.1 |
|||||||||
|
|
|||
X-Cart forums © 2001-2020
|