VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Shipping Modules => Topic started by: UncleBuck on March 17, 2005, 01:27:22 am

Title: Australia Post shipping
Post by: UncleBuck on March 17, 2005, 01:27:22 am
Given that I am a new Mambo and phpShop user, how easy would it be to create a shipping module for Australia Post by using their site at http://drc.edeliver.com.au/

They give all the details as to what would need to be passed to their web application and what gets returned.

See http://drc.edeliver.com.au/#Software
Title: Re: Australia Post shipping
Post by: Yak on April 16, 2005, 15:08:39 pm
Bump  ;D
This would be a nice inclusion for us Aussies  :o
Title: Re: Australia Post shipping
Post by: UncleBuck on April 20, 2005, 04:06:38 am
I know there is an osCommerce module that does this.

Does anyone know if an OC module could be easily converted for phpShop?
Title: Re: Australia Post shipping
Post by: scotta on April 30, 2005, 00:36:15 am
I also looked into this a while ago. The Aust Post Delivery Rate Calculator would be a great tool to use as it has up to date shipping rates. At the time I had no idea how to go about it so I modified the Standard Shipping module to add a weight based component and then added a total of 250+ shipping rates to cover standard, express, os standard and os express.

I note that in the new pre-stable 1.2 release there is a Canadian Shipping module. If this uses a similar system to Aust Post then it may be a basis for a suitable hack.

Just need a good programmer out there to help us Australians out.

Scott
Title: Re: Australia Post shipping
Post by: echidna on May 25, 2005, 09:49:19 am
I'm looking for this myself (and have posted elsewhere on the forum about it).

I've worked out how to use a php script to query the Australia Post Server but cannot yet get my head around feeding the 'real' variable from mambophpshop into the script.

What I've got so far looks like:

Code: [Select]
<?php
//set up the variables for Australia Post Query
$var_pickup '2476';
$var_destination '2001';
$var_country 'AU';
$var_weight '100';
$var_service 'Standard';
$var_length '100';
$var_width '100';
$var_height '100';
$var_quantity '1';

       
// Collect variables into the query URI for Australia Post
$myfile=file('http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode='.$var_pickup.'&Destination_Postcode='.$var_destination.'&Country='.$var_country.'&Weight='.$var_weight.'&Service_Type='.$var_service.'&Length='.$var_length.'&Width='.$var_width.'&Height='.$var_height.'&Quantity='.$var_quantity);
       
       
// Get Australia Post charge value separate to 'charge='
$APchargeArray split('=',$myfile[0]);
$APcharge $APchargeArray[1];

       
// Get Australia Post Time separate to 'days='
$APtimeArray split('=',$myfile[1]);
$APtime $APtimeArray[1];

       
// error message
$APerrorArray split('=',$myfile[2]);
$APerrorMessage $APerrorArray[1];
?>


So there are the input variables, and the output variables for Australia Post queries are:
$var_service could be hard coded into the script or be a choice made in the back end.

But I'm sure that the other variables are already in mambophpshop, so it *should* simply be a matter of
Code: [Select]
<?php $var_pickup $mambophpshopShopPostcodeVariableName?>
Whatever '$mambophpshopShopPostcodeVariableName' actually is? And so on the same for all the other variables in and out of mambo-phpshop.


Hoping some of yall can help
; D
Title: Re: Australia Post shipping
Post by: infragreg on July 02, 2005, 06:52:24 am
looks like there's a few aussies here that would love a Australia Post shipping module :) (And a few Aussie payment processors too)

Wish I could code :(

But there's got to be a way...just a rough idea that just popped into my head. If say 30 Aussies chipped in say 50 bucks each and we hired someone for $1500 (in this example..could be more or less :) ) to just do the work on shipping and payment stuff...would that be a good idea?

We don't have to sell the modules...just get the things to work and be done with it...

when u look at how many options OSCommerce has, it makes you weep :) Granted OSCommerce has had a head start and way more developers over the years...but it just would be nice for mambo-phpshop to start to catch up...we have such a great cart here and fantastic CMS...shame to see it struggle so much...

if only i could code :( and don't say I could start to learn...i tried and nearly lost all my hair :) Just wasn't born for it...literally :)

anyway, just an idea :)
Title: Re: Australia Post shipping
Post by: magyver on September 01, 2005, 15:42:01 pm
yep, you can add another one.

I was gong to have a look at zone shipping and work state by state.
I'm not interested in overseas. Run something like a lookup table to relate the different postcodes to the N1, N2, V1, V2 etc then run the clients postcode against the lookup table, then look up wieght then run the calculations. I will have to look at your link. I have been looking for thier calculator for months. The staff at Australia Post couldnt help me find it. Speaks for it's self.
Title: Re: Australia Post shipping
Post by: jacko on October 26, 2005, 15:30:25 pm
Hi all .. just posted the info below in another (incorrect?) post!

One of our developers has written a shipping module (eDeliver) which calculates shipping based on standard and express post rates. Only problem is it's commercial (due to an arrangement with the client we developed it for - non-exclusively - in the first place). It is under $50AUD and I'm happy to donate half to Soeren for his outstanding work (and the other half to our developers XMAS presents)!

Let me know if it's of interest .. I'm not a dev so I'm unlikely to be able to help you on the technical aspects but happy to answer any questions I can (and try to get answers for others) in the event you want to built it yourself.

Scott
Title: Re: Australia Post shipping
Post by: UncleBuck on November 09, 2005, 03:38:58 am
One of our developers has written a shipping module (eDeliver)

Jacko,
I hope they are not marketing it under that name as that is an Australia Post trade marked name.

They can get VERY nasty when you use one of their TM's without the official stamp of approval.
Title: Re: Australia Post shipping
Post by: spinfx on November 16, 2005, 04:57:30 am
Given that I am a new Mambo and phpShop user, how easy would it be to create a shipping module for Australia Post by using their site at http://drc.edeliver.com.au/


Uncle Buck and readers:  This looks to be the best way to go. I have a developer working on some new components for us, but when he's finished I'll ask him how much for doing this. I'll post the cost on here when I have it and if anyone would like to make donations, we can hopefully provide the finished shipping module to the community.

Cheers, David
Title: Re: Australia Post shipping
Post by: jacko on December 05, 2005, 23:37:17 pm
Hi All,

Firstly to UncleBuck .. no we are not actually marketing it at all. It's just that the code has already been written that uses AusPost's eDeliver functionality to calculate standard / express post costs and thought it may help other in Oz.

To spinfx, it is already written and as alluded to in the previous post it's $45 + GST - half of which we'll donate to Soeren. Of course you are quite welcome to have your developer do the same thing.

Any questions, just ask!

Regards,
Scott
Title: Re: Australia Post shipping
Post by: spinfx on December 13, 2005, 08:23:24 am
. . . the code has already been written that uses AusPost's eDeliver functionality to calculate standard / express post costs and thought it may help other in Oz.

 . . . it is already written and as alluded to in the previous post it's $45 + GST - half of which we'll donate to Soeren.

Hi Scott

Thanks - just a few comments

1. We need Domestic (Aussie/NZ) and Overseas Rates for small packages and parcels
2. We need Airmail, Economy Airmail and Seamail rates for overseas
3. We need Standard and Express Post rates for Domestic

Does your existing script cater for all these options when interrogating the Aussie Post eDeliver Server?

If we decide to go with your script, how do we pay you? We are a WA Govt agency and can only pay by Credit Card or against an Invoice.

Cheers, David

Regards, David
Title: Re: Australia Post shipping
Post by: benneh on January 12, 2006, 01:17:27 am
Another Aussie here who would love to see this functionality.  I would pledge up to $50 for someone to develop this.

Title: Re: Australia Post shipping
Post by: bcoble on January 13, 2006, 15:05:38 pm
Hi there all...I am a coder php/mysql/js 5+ yrs - and a muso  ??? - but I have no experience in coding anything specifically for mambo/joomla yet...I'm new to VirtueMart and currently just trying to get a shop up and happening at my bands site http://www.beatels.com. I came across a bug/feature  :)  with the tax on shipping and came here searching for enlightenment. I saw the pleadings for someone to code this into a module and felt that I should say hello.

I've built web apps, intranets - even an order system for a telco that calls prices for customer orders from the wholesale supplier's website. Sounds kinda deja-vu to me...

I'm not expecting a huge amount of trade at our site - it's more of a service for our audience - so I've just created a bunch of shipping rates that covers most but not all of the possibilities. But the thought of being able to calculate shipping via AusPost by calling up their postage calculator (which I stupidly did by hand) from within the code does seem like a highly attractive/sensible way of doing things  ;)

I was really planning on doing other things in the few weeks I have spare before other duties call. But if it turns out that an Auspost module could be done in a short amount of time, I *may* be able to help.

One minor obstace is the fact that I have no idea of how mambo/joomla works in a *developer* sense - names of global variables, which class calls which, etc. I also have no idea how to write a module for mambo/joomla. Then again, I have never actually wanted to know until now. If someone could steer me in the right direction (good tutorials or tips from one of the virtuemart developers) for some of the above, I could at least assess whether I can help out with this...

On a slightly-related matter, I reported elsewhere in this forum that, although my standard shipping module was not adding tax to shipping costs, I had found that by manually updating the mos_vm_shipping_rate table shipping_rate_vat_id with the id from the tax rate you wished to use for that shipping rate, I was able to at least get tax added to shipping where applicable. Hope that helps anybody with the same problem.

Undeniably, it's an ugly solution, and I began to wonder if I should just fix the code myself. But that would mean I would need to get to know 'coding for mambo/joomla', which as I have said before, I had been avoiding...

"Life is what happens to you while you're busy making other plans" John Lennon
Title: Re: Australia Post shipping
Post by: benneh on January 14, 2006, 01:34:31 am
Righto well I have practically zero experience with php, and I am not a programmer by trade, but I have messed around with programming a a little so I thought I would dive right in and give this a go, as I really need this functionality on my site.

I just took bits from other shipping modules and kinda slapped it all together, its taken me about 3 hours this morning to throw these files together, and I have made some good progress to the point this now works with the exception of pulling the delivery and parcel details out of the database.  Here is the Australia Post Class code:

This is auspost.php, located in "administrator\components\com_virtuemart\classes\shipping"
Code: [Select]
<?php
defined
('_VALID_MOS') or die('Direct Access to this location is not allowed.');
/**
*
* @version $Id: auspost.php,v 1.0 2006/01/13 12:00:00 benneh Exp $
* @package VirtueMart
* @subpackage shipping
* @copyright Copyright (C) 2006 Ben Wilson. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/

/**
*
* This class will charge a shipping rate determined by passing parameters to 
* http://drc.edeliver.com.au/ 
* @copyright (C) 2006 Ben Wilson

*******************************************************************************
*/
class auspost {

var $classname "auspost";

function list_rates( &$d ) {
global $total$tax_total$CURRENCY_DISPLAY;
$db =& new ps_DB;
$dbv =& new ps_DB;

$cart $_SESSION['cart'];

/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");

if ( $_SESSION['auth']['show_price_including_tax'] != ) {
$taxrate 1;
$order_total $total $tax_total;
}
else {
$taxrate $this->get_tax_rate() + 1;
$order_total $total;
}

//TODO - extract variables from the database for the product weight and dimenstions, and the users zip/postcode and country
//$dbu = new ps_DB; //DB User
//$q  = "SELECT country,zip FROM #__{vm}_user_info WHERE user_info_id = '". $d["ship_to_info_id"] . "'";

//$dbc->query($q);
//$dbc->next_record();

//$zip = $dbc->f("zip");
//$country = $dbc->f("country");

//set up the variables for Australia Post Query

//Postcode of the pick-up address (e.g. 3015)
$Order_Pickup_Postcode Pickup_Postcode;
//$Order_Pickup_Postcode = '2615';

//Postcode of the delivery destination (e.g. 2615)
$Order_Destination_Postcode '2001';

//The country of delivery destination designated by two alpha characters. For example, AU stands for Australia
$Order_Country 'AU';

//The weight of the parcel or item measured in grams (g)
$Order_Weight '10000';

//The type of servive, available types are "Standard", "Express", "Air", "Sea", and "Economy"
$Order_Service_Type Service_Type;
//$Order_Service_Type = 'STANDARD';

//The length of the item or parcel in millimetres (mm)
$Order_Length '100';

//The width of the item or parcel in millimetres (mm)
$Order_Width '100';

//The height of the item or parcel in millimetres (mm)
$Order_Height '100';

//This is the quantity of items for which the customer is estimating the delivery charges
$Order_Quantity '1';


//Fee for packaging and handling, added to the delivery costs returned by auspost
$Order_Handling_Fee Handling_Fee;

    // Collect variables into the query URI for Australia Post
$myfile=file('http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode='.$Order_Pickup_Postcode.'&Destination_Postcode='.$Order_Destination_Postcode.'&Country='.$Order_Country.'&Weight='.$Order_Weight.'&Service_Type='.$Order_Service_Type.'&Length='.$Order_Length.'&Width='.$Order_Width.'&Height='.$Order_Height.'&Quantity='.$Order_Quantity);
       
// Get Australia Post charge value separate to 'charge='
$APchargeArray split('=',$myfile[0]);
$APcharge $APchargeArray[1];

// Get Australia Post Time separate to 'days='
$APtimeArray split('=',$myfile[1]);
$APtime $APtimeArray[1];

// error message
$APerrorArray split('=',$myfile[2]);
$APerrorMessage $APerrorArray[1];

$order_shipping $APcharge;

$html .= "<label for=\"flex_shipping_rate\">Australia Post: ".$CURRENCY_DISPLAY->getFullValue($order_shipping);
$html .= "</label>";

$_SESSION[$shipping_rate_id] = 1;

echo $html;
return true;
}

function get_rate( &$d ) {

$shipping_rate_id $d["shipping_rate_id"];
$is_arr explode("|"urldecode(urldecode($shipping_rate_id)) );
$order_shipping $is_arr[3];

return $order_shipping;

}


function get_tax_rate() {

/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");

if( intval(FLEX_TAX_CLASS)== )
return( );
else {
require_once( CLASSPATH"ps_tax.php" );
$tax_rate ps_tax::get_taxrate_by_idintval(FLEX_TAX_CLASS) );
return $tax_rate;
}
}

/* Validate this Shipping method by checking if the SESSION contains the key
* @returns boolean False when the Shipping method is not in the SESSION
*/
function validate$d ) {

$shipping_rate_id $d["shipping_rate_id"];

if( array_key_exists$shipping_rate_id$_SESSION )) {

return true;
}
else {
return false;
}
}
/**
    * Show all configuration parameters for this Shipping method
    * @returns boolean False when the Shipping method has no configration
    */
function show_configuration() {
global $VM_LANG;
/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");
    
?>

      <table>
    <tr>
        <td><strong>Pickup Postcode:</strong></td>
<td>
            <input type="text" name="Pickup_Postcode" class="inputbox" value="<?php echo Pickup_Postcode ?>" />
</td>
<td>
        <?php echo mm_ToolTip("Postcode of the pick-up address (e.g. 2615)"?>
        </td>
    </tr>
    <tr>
        <td><strong>Service Type:</strong>
</td>
<td>
            <input type="text" name="Service_Type" class="inputbox" value="<?php echo Service_Type ?>" />
</td>
<td>
        <?php echo mm_ToolTip("The Australia Post delivery service type (Types of service available include Standard|Express|Air|Sea|Economy)"?>
        </td>
    </tr>
    <tr>
        <td><strong>Handling Fee:</strong>
</td>
<td>
            <input type="text" name="Handling_Fee" class="inputbox" value="<?php echo Handling_Fee ?>" />
</td>
<td>
            <?php echo mm_ToolTip("This is your fee for packaging and handling, and is added to the delivery costs returned by auspost"?>
        </td>
    </tr>
  <tr>
<td><strong><?php echo $VM_LANG->_PHPSHOP_UPS_TAX_CLASS ?></strong></td>
<td>
  <?php
  require_once(CLASSPATH.'ps_tax.php');
  ps_tax::list_tax_value("FLEX_TAX_CLASS"FLEX_TAX_CLASS?>

</td>
<td><?php echo mm_ToolTip($VM_LANG->_PHPSHOP_UPS_TAX_CLASS_TOOLTIP?><td>
  </tr>
</table>
   <?php
   
// return false if there's no configuration
   
return true;
}
/**
  * Returns the "is_writeable" status of the configuration file
  * @param void
  * @returns boolean True when the configuration file is writeable, false when not
  */
function configfile_writeable() {
return is_writeableCLASSPATH."shipping/".$this->classname.".cfg.php" );
}

/**
* Writes the configuration file for this shipping method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
    global $vmLogger;

$my_config_array = array("Pickup_Postcode" => $d['Pickup_Postcode'],
"Service_Type" => $d['Service_Type'],
"Handling_Fee" => $d['Handling_Fee'],
"FLEX_TAX_CLASS" => $d['FLEX_TAX_CLASS']
);
$config "<?php\n";
$config .= "defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); \n\n";
foreach( $my_config_array as $key => $value ) {
$config .= "define ('$key', '$value');\n";
}

$config .= "?>
";

if ($fp = fopen(CLASSPATH ."shipping/".$this->classname.".cfg.php", "w")) {
fputs($fp, $config, strlen($config));
fclose ($fp);
return true;
}
else {
$vmLogger->err( "Error writing to configuration file" );
return false;
}
}
}


?>

This is auspost.cfg.php, located in "administrator\components\com_virtuemart\classes\shipping"
Code: [Select]
<?php
defined
('_VALID_MOS') or die('Direct Access to this location is not allowed.'); 

define ('Pickup_Postcode''2615');
define ('Service_Type''STANDARD');
define ('Handling_Fee''5');
define ('FLEX_TAX_CLASS''0');
?>



This is auspost.ini, located in "administrator\components\com_virtuemart\classes\shipping"
Code: [Select]
# $Id: auspost.ini,v 1.0 2006/01/14 12:00:00 benneh Exp $
[General]
name = auspost
version = 1.0
creationDate = January 2006
author = Ben Wilson
authorEmail = ben@diversionware.com.au
authorUrl = diversionware.com.au/
copyright = diversionware
license = LGPL
description = Australia Post Shipping Module

[File]
filename =auspost.php


Now all I need to do is get out of the virtuemart database is package dimensions, weight and users delivery postcode.

It would be good if soeren or one of the more knowledgeable guys on this forum could let me know how to do that and save me some time, otherwise I will just keep at it and should have a fully working module for Australia Post very very shortly  8)
Title: Re: Australia Post shipping
Post by: benneh on January 14, 2006, 05:08:01 am
Ok I have been doing this thing pretty for about 5 hours now, and I have it working perfect with the exception of one bug, the quantities don't seem to be affecting the total delivery as expected... anyhow here is an update on the code for those interested

Each time I increase the quantity 10 fold, the delivery cost seems to double  ???  I will look at it a bit later, but for now i think its a pretty good outcome, and 95% of the way there :D

Code: [Select]
<?php
defined
('_VALID_MOS') or die('Direct Access to this location is not allowed.');
/**
*
* @version $Id: auspost.php,v 1.0 2006/01/13 12:00:00 benneh Exp $
* @package VirtueMart
* @subpackage shipping
* @copyright Copyright (C) 2006 Ben Wilson. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/

/**
*
* This class will charge a shipping rate determined by passing parameters to 
* http://drc.edeliver.com.au/ 
* @copyright (C) 2006 Ben Wilson

*******************************************************************************
*/
class auspost {

var $classname "auspost";

function list_rates( &$d ) {
global $total$tax_total$CURRENCY_DISPLAY;

$cart $_SESSION['cart'];

/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");

if ( $_SESSION['auth']['show_price_including_tax'] != ) {
$taxrate 1;
$order_total $total $tax_total;
}
else {
$taxrate $this->get_tax_rate() + 1;
$order_total $total;
}

//Create DB User Object for Current User
$dbu = new ps_DB;
$q  "SELECT country,zip FROM #__{vm}_user_info WHERE user_info_id = '"$d["ship_to_info_id"] . "'";
$dbu->query($q);
if (!$dbu->next_record()) {
/*$vmLogger->err( $VM_LANG->_PHPSHOP_CHECKOUT_ERR_SHIPTO_NOT_FOUND );
return False;*/
}

//Create DB Vendor Object for Shop Vendor
$dbv = new ps_DB;
$q  "SELECT * from #__{vm}_vendor, #__{vm}_country WHERE vendor_id='" $_SESSION["ps_vendor_id"] . "' AND (vendor_country=country_2_code OR vendor_country=country_3_code)";
$dbv->query($q);
$dbv->next_record();

//$dbv = new ps_DB
//$q  = "SELECT * FROM #__{vm}_vendor WHERE vendor_id='".$_SESSION['ps_vendor_id']."'";
//$dbv->query($q);
//$dbv->next_record();

//set up the variables for Australia Post Query

//Postcode of the pick-up address (e.g. 3015)
//$Order_Pickup_Postcode = '2615';
//$Order_Pickup_Postcode = Pickup_Postcode;
$Order_Pickup_Postcode $dbv->f("vendor_zip");

//Postcode of the delivery destination (e.g. 2615)
//$Order_Destination_Postcode = '2001';
$Order_Destination_Postcode $dbu->f("zip");

//The country of delivery destination designated by two alpha characters. For example, AU stands for Australia
$Order_Country 'AU';

//The weight of the parcel or item measured in grams (g)
//$Order_Weight = '10000';
$Order_Weight $d['weight'];

//The type of servive, available types are "Standard", "Express", "Air", "Sea", and "Economy"
$Order_Service_Type Service_Type;
//$Order_Service_Type = 'STANDARD';

//The length of the item or parcel in millimetres (mm)
//Auspost returns same value so long as this is valid ie between 100 and 500, so we use a fixed 250 as a placeholder
$Order_Length '250';

//The width of the item or parcel in millimetres (mm)
$Order_Width '250';

//The height of the item or parcel in millimetres (mm)
$Order_Height '250';

//This is the quantity of items for which the customer is estimating the delivery charges
//Always set to one, as virtuemart does the multiplying for us based on quantity in cart
$Order_Quantity '1';

//Fee for packaging and handling, added to the delivery costs returned by auspost
$Order_Handling_Fee Handling_Fee;

    // Collect variables into the query URI for Australia Post
$myfile=file('http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode='.$Order_Pickup_Postcode.'&Destination_Postcode='.$Order_Destination_Postcode.'&Country='.$Order_Country.'&Weight='.$Order_Weight.'&Service_Type='.$Order_Service_Type.'&Length='.$Order_Length.'&Width='.$Order_Width.'&Height='.$Order_Height.'&Quantity='.$Order_Quantity);

echo 'http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode='.$Order_Pickup_Postcode.'&Destination_Postcode='.$Order_Destination_Postcode.'&Country='.$Order_Country.'&Weight='.$Order_Weight.'&Service_Type='.$Order_Service_Type.'&Length='.$Order_Length.'&Width='.$Order_Width.'&Height='.$Order_Height.'&Quantity='.$Order_Quantity;

// Get Australia Post charge value separate to 'charge='
$APchargeArray split('=',$myfile[0]);
$APcharge $APchargeArray[1];

// Get Australia Post Time separate to 'days='
$APtimeArray split('=',$myfile[1]);
$APtime $APtimeArray[1];

// error message
$APerrorArray split('=',$myfile[2]);
$APerrorMessage $APerrorArray[1];

$order_shipping $APcharge $Order_Handling_Fee;

$html .= "<label for=\"flex_shipping_rate\">Australia Post: ".$CURRENCY_DISPLAY->getFullValue($order_shipping);
$html .= "</label>";

$_SESSION[$shipping_rate_id] = 1;

echo $html;
return true;
}

function get_rate( &$d ) {

$shipping_rate_id $d["shipping_rate_id"];
$is_arr explode("|"urldecode(urldecode($shipping_rate_id)) );
$order_shipping $is_arr[3];

return $order_shipping;

}


function get_tax_rate() {

/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");

if( intval(FLEX_TAX_CLASS)== )
return( );
else {
require_once( CLASSPATH"ps_tax.php" );
$tax_rate ps_tax::get_taxrate_by_idintval(FLEX_TAX_CLASS) );
return $tax_rate;
}
}

/* Validate this Shipping method by checking if the SESSION contains the key
* @returns boolean False when the Shipping method is not in the SESSION
*/
function validate$d ) {

$shipping_rate_id $d["shipping_rate_id"];

if( array_key_exists$shipping_rate_id$_SESSION )) {

return true;
}
else {
return false;
}
}
/**
    * Show all configuration parameters for this Shipping method
    * @returns boolean False when the Shipping method has no configration
    */
function show_configuration() {
global $VM_LANG;
/** Read current Configuration ***/
require_once(CLASSPATH ."shipping/".$this->classname.".cfg.php");
    
?>

      <table>
    <tr>
        <td><strong>Pickup Postcode:</strong></td>
<td>
            <input type="text" name="Pickup_Postcode" class="inputbox" value="<?php echo Pickup_Postcode ?>" />
</td>
<td>
        <?php echo mm_ToolTip("Postcode of the pick-up address (e.g. 2615)"?>
        </td>
    </tr>
    <tr>
        <td><strong>Service Type:</strong>
</td>
<td>
            <input type="text" name="Service_Type" class="inputbox" value="<?php echo Service_Type ?>" />
</td>
<td>
        <?php echo mm_ToolTip("The Australia Post delivery service type (Types of service available include Standard|Express|Air|Sea|Economy)"?>
        </td>
    </tr>
    <tr>
        <td><strong>Handling Fee:</strong>
</td>
<td>
            <input type="text" name="Handling_Fee" class="inputbox" value="<?php echo Handling_Fee ?>" />
</td>
<td>
            <?php echo mm_ToolTip("This is your fee for packaging and handling, and is added to the delivery costs returned by auspost"?>
        </td>
    </tr>
  <tr>
<td><strong><?php echo $VM_LANG->_PHPSHOP_UPS_TAX_CLASS ?></strong></td>
<td>
  <?php
  require_once(CLASSPATH.'ps_tax.php');
  ps_tax::list_tax_value("FLEX_TAX_CLASS"FLEX_TAX_CLASS?>

</td>
<td><?php echo mm_ToolTip($VM_LANG->_PHPSHOP_UPS_TAX_CLASS_TOOLTIP?><td>
  </tr>
</table>
   <?php
   
// return false if there's no configuration
   
return true;
}
/**
  * Returns the "is_writeable" status of the configuration file
  * @param void
  * @returns boolean True when the configuration file is writeable, false when not
  */
function configfile_writeable() {
return is_writeableCLASSPATH."shipping/".$this->classname.".cfg.php" );
}

/**
* Writes the configuration file for this shipping method
* @param array An array of objects
* @returns boolean True when writing was successful
*/
function write_configuration( &$d ) {
    global $vmLogger;

$my_config_array = array("Pickup_Postcode" => $d['Pickup_Postcode'],
"Service_Type" => $d['Service_Type'],
"Handling_Fee" => $d['Handling_Fee'],
"FLEX_TAX_CLASS" => $d['FLEX_TAX_CLASS']
);
$config "<?php\n";
$config .= "defined('_VALID_MOS') or die('Direct Access to this location is not allowed.'); \n\n";
foreach( $my_config_array as $key => $value ) {
$config .= "define ('$key', '$value');\n";
}

$config .= "?>
";

if ($fp = fopen(CLASSPATH ."shipping/".$this->classname.".cfg.php", "w")) {
fputs($fp, $config, strlen($config));
fclose ($fp);
return true;
}
else {
$vmLogger->err( "Error writing to configuration file" );
return false;
}
}
}


?>
Title: Re: Australia Post shipping
Post by: bcoble on January 14, 2006, 06:09:16 am
Hey benneh, nice work! :o

I've had a look at the code and done a test on my site, and I've got a few comments.

By putting the selection of the delivery type in the config file and only getting the Aust Post price for that one delivery type, the user doesn't get a chance to select whether they want standard delivery or express post for domestic, for instance. In my testing, the checkout process produced one price option only. The Aust Post value was correct, but without the radio buttons, it didn't seem to pass the value to the next page, and keeps asking the user to select a shipping option.

Also, we probably need some flexibility in the implementation of the handling charge.

For instance, I'm looking at selling a range of products - from 100g CDs to 2kg framed pictures. The cost of a CD box is not the same as the cost of a large box for a glass-framed picture. I therefore need some way to add the (varied) cost of the packaging to the cost of the postage. The shipping rates form allows you to do this on a per-shipping-rate-basis, but because this module is getting it directly from auspost, it can't be specified anywhere yet, aside from the one-fee-for-all box in the config.

For the time being, the single handling-fee box approach should suffice. Just a note: the handling-fee is not currently being added to the AusPost price...

I will have a go at addressing some of these issues tonight...see how I go...

Title: Re: Australia Post shipping
Post by: bcoble on January 14, 2006, 06:11:16 am
After posting my note, I saw that you'd posted your update...I'll check it out...
Title: Re: Australia Post shipping
Post by: bcoble on January 14, 2006, 06:35:29 am
Okay, just run a quick test on my site, and got an error. My weight was entered as 0.225. It seems that the DLC can't handle amounts below 1.00...the Auspost DLC site says of the weight data is requires:

The weight of the parcel or item measured in grams (g).

Not sure how to deal with this, but I thought you should know about it...
Title: Re: Australia Post shipping
Post by: bcoble on January 14, 2006, 07:48:43 am
Further to the weight issue, I checked my product, which has a weight of 225 and a unit of measurement I have called "g" (for grams). During the order process, my product weight of 225g gets converted to .225 somehow when it's passed to the shipping module array $d. It's almost as if the weight is formatted to be delivered in kg, whereas DLC requires weights in grams...

So I changed auspost.php line 88 from
Code: [Select]
$Order_Weight = $d['weight']; to
Code: [Select]
$Order_Weight = $d['weight']*1000; . This removed the error and seemed to produce the correct postage charge as well  :)

However, it still crashes for me at the select a shipping method stage, asking me to select a method...the handling fee *is* being added to the auspost charge now, which is good!
Title: Re: Australia Post shipping
Post by: benneh on January 14, 2006, 11:16:35 am
hey bcoble, thanks for the feedback.  there are a few bugs to iron out yet, I just wanted , I also need to implement some error checking, which should be easy enough as DLC has nice meaningful errors when something ain't right.  At the moment it just says delivery = $0.00 if something errors, which isn't good for business, but nice for customers, yay free delivery!!  ;D

So current todo list is:

Error checking
Radio Buttons for customer to select service type, ie standard, express, etc
update line 88 for grams

as for the packaging and handling charge being variable for each item, the database currently has no field for this purpose, but it does have a "custom_attribute" which i may be able to utilise for this purpose.

i am all out of time to work on this for now, but hopefully sometime in the next week I will be able to tackle the above... post any more updates here and I will incorporate those too.

keep the feedback and suggestions coming
Title: Re: Australia Post shipping
Post by: benneh on January 16, 2006, 07:27:21 am
WOOHOO!  Australia Post Shipping Module after many hours of effort (more than i thought it would take when i set about this) is now finished and attached for your pleasure :D

It now handles weight correctly, passes variables correctly to allow progression to final step of the checkout, and has built in error checking if drc passes it back some kind of error.

As for the choices between standard, express, etc what I suggest you do is have two copies of this module in your shipping list, one for regular and one for express, then the user will be presented with both options including  showing them the cost comparisons.

Files are attached, upload them to your administrator/components/com_virtuemart/classes/shipping directory and away you go.  Enjoy everyone and keep open source open :)

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: bcoble on January 30, 2006, 15:45:09 pm
Thanks for that Benneh! Really appreciated. But I'm having a problem with it using Paypal as the payment method - I don't know whether you can help me with this one, but I'm absolutely stuck:  ???

Doing a test order within Australia (which adds a 10% GST to the product and deducts 1/11th from the GST-inclusive shipping charge returned by Australia Post), everything adds up correctly within the module at the time of checkout.

For example,
- A $30 CD has a total of $33, of which $3 is correctly the GST.
- The shipping for my test is $8.60, of which $.78 is GST.
- So the order total is correctly $41.60, which includes $3.78 of GST.

But when the customer is transferred to PayPal for processing the payment, the order total is $33.78.  :o

It appears that the PayPal processor is receiving the product total inclusive of GST ($33), and the GST on the shipping ($0.78), but the value of the shipping itself ($8.60)  ::)

Can you Benneh or anyone else give me any clues as to why PayPal is only getting some of the data? It's kind of critical to everything I'm trying to do if PayPal is not charging my shipping  :'(
Title: Re: Australia Post shipping
Post by: bcoble on January 30, 2006, 16:58:56 pm
It's alright folks, I've found the answer after a bit of rustling around (for those of you using paypal only - I haven't tested this for use with other payment methods aside from paypal).

In the Payment Methods listing, I selected the PayPal method, and clicked on the Configuration tab. In the code section, go to the section at the top of the code (lines 11 & 12) which refer to "shipping" and "amount", and replace them with the following:
Code: [Select]
"shipping" => sprintf("%.2f", $db->f("order_shipping")),
"amount" => (sprintf("%.2f", $db->f("order_shipping"))) + (round( $db->f("order_subtotal")+$tax_total, 2)),

What I've done is add the shipping to the order amount (which appears to be just the total of the products inclusive of GST in the default PayPal code).

Then in PayPal, I have selected to not charge postage (as it's included in the data sent from VirtueMart to PayPal).

So far, it all seems to work quite dandy...

By the way, I'm testing a update I'm working on that displays a range of shipping options for each order depending on the country of destination for the order. In short, if the order is going within Australia, the user gets the standard and the express post options. If the destination is outside of Australia, the user is presented with Australia Post's international service options...I'll post when it's been given a run through... ;)
Title: Re: Australia Post shipping
Post by: benneh on January 31, 2006, 05:06:47 am
I dont believe this is a problem with the auspost module, but rather a problem with the paypal module.  make sure you choose the right tax mode in the auspost configuration too, otherwise it will not include GST.
Title: Re: Australia Post shipping
Post by: spinfx on February 06, 2006, 05:47:10 am
benneh

This is great!!! We have been struggling to get this together for ages - trying to interface with Australia Post's  online pricing database so we didn't have to recode everything when they change rates. Really cool mate!

Don't suppose you know if anyone is working on payment modules for the major Aussie Banks do you?

Cheers - David
Title: Re: Australia Post shipping
Post by: benneh on February 06, 2006, 06:57:02 am
nope not aware of anything for aus banks, there is support for eway, a very highly rated aussie payment gateway though...

glad you like the module :D
Title: Re: Australia Post shipping
Post by: UncleBuck on February 15, 2006, 22:11:41 pm
benneh.... Mate.... Great job on the shipping module.

I have been playing with the code of your shipping module and have managed to get it to the point where the configuration allows you to select the type(s) of service that you want to allow in the shop. The shipping for each service type is calculated correctly by DRC and displayed on the shipping selection page, but then I have an error when you go to the checkout that causes it to fall in a heap.

I am not what you would call a programer and php is all new to me. I was wondering if you would be interested in colaborating on this to try and get this working. I don't think it will be a major effort to fix the last step, I just think I don't have enough experience with virtuemart and php to jump this last hurdle.

Col.
Title: Re: Australia Post shipping
Post by: benneh on February 15, 2006, 23:22:53 pm
yep, i'd be interested in taking a look at what you have done, send me a PM where I can download your code from...
Title: Re: Australia Post shipping
Post by: UncleBuck on February 16, 2006, 10:10:09 am
This is basically what I have as a look so far:


[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: Gippsweb on February 28, 2006, 02:27:51 am
Hi Benneh, this is a great module and has finally made me move across from the osc side.
Although as my host has allow_url_fopen turned off we cannot seem to get it working.
Have you seen this problem b4?
I may have changed from osc2nuke to mambo/joomla about the time this setting was changed by my host because I'm sure I had the auspost module from oscommerce working ok.
Title: Re: Australia Post shipping
Post by: mavric on March 16, 2006, 07:09:42 am
Benneh, great work on the module its much appreciated.

Title: Re: Australia Post shipping
Post by: spinfx on March 21, 2006, 06:23:12 am
Uncle Buck

Love your graphics for AusPost - great work!

How did you configure so users can choose parcel or airmail or economy air etc? This would look right at home built into the module itself.

Please tell how you did it all.

Thanks, David ;-)
Title: Re: Australia Post shipping
Post by: UncleBuck on March 28, 2006, 23:24:05 pm
A number of people have asked for an update on where my changes are at and as a result I have decided to attach the shipping module here. I am currently using it on one production site and have not had any problems, however, the site it is used on is a VERY low traffic site and does not get many sales. You should treat this as a beta release at this time.

Please note that there are a number of comments in the code and I am waiting for Benneh to go over it and just make sure that all is ok.

I would never have been able to get this started without the initial code written by Benneh and I have left it up to him to finalize and release it as part of the Virtuemart package.

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: Szandokan on March 28, 2006, 23:45:11 pm
You're a legend UncleBuck!

I've downloaded your "Advanced" Australia Post Shipping Module (I think I was the first one  ;) ) and tried it on a development site.  It all works very well!

I tested it with both domestic (Australian) and international delivery addresses and the rates work out right for each Shipping Type, disabling the apropriate ones that don't apply.  It even includes estimated delivery times!  Fantastic!

One immediate thought that comes to mind for an enhancement would be to simply hide the Shipping Types that don't apply to the selected shipping address, instead of showing them with a note that they're not available.  If I get a chance in the next couple of days to try and do this, I'll let you know how I go with it.

Great job!
Title: Re: Australia Post shipping
Post by: UncleBuck on March 29, 2006, 00:03:28 am
That should ba a really simple mod to do.

I mainly left it in to confirm that all was working as it should. My personal opinion is to only show what ones are available but just havn't got around to it yet.
Title: Re: Australia Post shipping
Post by: UncleBuck on March 29, 2006, 00:07:20 am

I've downloaded your "Advanced" Australia Post Shipping Module (I think I was the first one  ;) ) and tried it on a development site.  It all works very well!


Maybe it should be "Advanced" Australia FARE   :D......   Ok, I know that was a bit on the sick joke side, but I just couldn't resist.
Title: Re: Australia Post shipping
Post by: FunkyMojo on April 05, 2006, 00:57:44 am
hi fellow aussies :)

ok I have a couple of questions.

I ship computer parts and I Like the look of this updated version of the module. However as you know pc parts eg: monitors  somtimes weigh too much ( when 2 or 3 are ordered ) for the 20 kg limit for austpost. I tested it with 2 full size monitors and the error message

"Australia Post shipping calculator failed, reason: Invalid weight parameter "

Can I change this message ??? so it says something other than this ???

 if so where ??


Thanks


Funky





Title: Re: Australia Post shipping
Post by: UncleBuck on April 12, 2006, 03:37:21 am

One immediate thought that comes to mind for an enhancement would be to simply hide the Shipping Types that don't apply to the selected shipping address, instead of showing them with a note that they're not available. 

This is easy to do by just commenting out lines 168 and 172 of the auspost.php file.
Title: Re: Australia Post shipping
Post by: UncleBuck on April 12, 2006, 04:06:26 am
"Australia Post shipping calculator failed, reason: Invalid weight parameter "

Can I change this message ??? so it says something other than this ???
Yes you can...
At line 174 of the auspost.php file, insert the following:
Code: [Select]
elseif(trim(strtolower($APerrorMessage)) == $service." Invalid weight parameter ")
 {
  $html .= "Product to heavy to ship via Australia Post. Please select another shipping method.<br>";
 }

Note: I haven't tested this but it should work so long as the string is exactly what is returned from auspost (including whitespace).
You could put whatever you liked into the $html.=
Title: Re: Australia Post shipping
Post by: diver on April 17, 2006, 21:15:29 pm
G'day
I am not may change handling. I change amount - this not add.
Title: Re: Australia Post shipping
Post by: spinfx on April 24, 2006, 08:59:10 am
Hi Uncle Buck

Have just installed the Advanced Australia (fare - LOL) Post Shipping Module and it works well except that I cannot get the images to show - all I get is the ALT wording. I've chcked the images and path over and over and can't see anything wrong. The images are in the "images" folder.

Do you have any ideas?

My site is not yet live or available outside so I can't show you the problem - sorry.

Hope you can help.
Regards, David
Title: Re: Australia Post shipping
Post by: mavric on April 24, 2006, 09:04:57 am
Where did you put the images directory spinfx?

Hi Uncle Buck

Have just installed the Advanced Australia (fare - LOL) Post Shipping Module and it works well except that I cannot get the images to show - all I get is the ALT wording. I've chcked the images and path over and over and can't see anything wrong. The images are in the "images" folder.

Do you have any ideas?

My site is not yet live or available outside so I can't show you the problem - sorry.

Hope you can help.
Regards, David
Title: Re: Australia Post shipping
Post by: spinfx on April 24, 2006, 09:50:18 am
Where did you put the images directory spinfx?

I put the images directory as  "/administrator/components/com_virtuemart/classes/shipping/images"

Cheers, David ;-)
Title: Re: Australia Post shipping
Post by: mavric on April 24, 2006, 15:25:33 pm


I put the images directory as  "/administrator/components/com_virtuemart/classes/shipping/images"

Cheers, David ;-)

Strange, that is the same place I put mine. Have you checked your file permissions?
Title: Re: Australia Post shipping
Post by: laurie_lewis on April 25, 2006, 12:00:03 pm
I am having similar problems with my AusPost images not showing when the shipping options come up.  I too am just getting the text.  The directory and files are 777.

The images show up when configuring the module.

I have also tried the add on for the specific message to come up when items are over 20 kg but can not get it to work.

Laurie
Title: Re: Australia Post shipping
Post by: mavric on April 27, 2006, 09:26:57 am
My directory is 755 and the images contained within the directory are 644. Im not sure if you want 777, I would change that.
Title: Re: Australia Post shipping
Post by: laurie_lewis on April 27, 2006, 14:17:59 pm
I only set it to 777 to see if the images came up.  Didn't change anything.

Laurie
Title: Re: Australia Post shipping
Post by: laurie_lewis on April 28, 2006, 06:16:22 am
I solved my problems with the display of auspost icons by changing some paths.

the icons were showing up for configuration so I left those alone.

for the display in the shop I realised that the path changes through my secure server and because of that the path was TOO long.  I put the images up higher in path and fixed the path up for the secure server and now I have the icons.

Laurie

http://mydigitalhome.com.au
Title: Re: Australia Post shipping
Post by: spinfx on May 02, 2006, 11:08:41 am
Hi

Also solved the issue of the icons not showing - was also to do with the path.

Have another issue re items that are less than threshold for parcel post. For example, we sell national park passes, which a just clear windscreen stickers for your car. They weight virtually nothing and we usually post them out in a normal envelope. We also have a few books that weigh around 65 grams and these also go in a normal envelope for standard letter rate.

The Aus Post Shipping Module does not have the option to select Letter Rates (either domestic or overseas) so the postage for these items is usually quoted at parcel rates, which are considerably higher.

I contacted Ben about this and he suggested that it should be possible to include a threshold (presumably the threshold from Letter to Parcel weight) under which the module would not interogate the Aus Post rates, but instead just add a fixed postage and packing rate.

Here's what he had to say:

Quote
There is nothing specifically written in my module to handle small weights, it simply passes back exactly what it gest from the DRC.

That said, it would not be too hard to modify the module such that if a weight is below a predetermined threshold, it does not use the DRC but instead just gives a fixed amount for shipping anywhere in Australia to cover a standard letter postage cost.

It shouldn't be more than a couple of hours work to add the functionality you require.

Unfortunately, Ben is snowed under and is unable to take a look himself. I'm not well versed with php so wouldn't really know where to start and would probably screw things up. If there's anyone who can have a look at this, I'm sure it would add some great functionality for all the Aussie users.

Here's some additional comments from Ben:

Quote
If you want to try implement this, the file you need to look at is under /administrator/components/com_virtuemart/classes/shipping/auspost.php

Right after the section where it gets the weight, you could add an if statement where if under a certain weight it sets and returns a fixed cost.  Ideally you could this to the administration section too, so end users could set the max weight threshold and the amount to charge through the joomla/virtuemart admin interface.

Of course, anything that results will be sent back to Ben for inclusion.

Thanks in advance

David  :)
Title: Re: Australia Post shipping
Post by: spinfx on May 11, 2006, 08:09:00 am
OK

We've now added a minimum threshold so anything below that will not be sent to Australia Post for pricing.

The changes in each file are fairly minimal and in the auspost.php file are shown by the notation "added by Chris Ewing"

In the auspost.cfg.php file, there is just one line added that contains the hardcoded Threshold weight. Would be nice if this could be incorporated into the module configuration - any offers anyone?

I think it would also be useful to be able to set the postage rate (cost) in the module configuration for items weighing less than the threshold - and if set to zero, would just be the standard packing and handling charge.

Anyway, hope this mod is useful - the two modified files are attached - please be sure they meet your needs before using them as they are presented here with no guarantees - except that they work for us.

Cheers, David  :)

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: scrappy on May 17, 2006, 04:51:05 am
Oh no!  Ive installed the Aust post shipping module weeks ago, and is working lovely.  The I realised that I too needed to be able to only charge standard letter costs sometimes.

So I downloaded the newest component but heres the funny thing...

I CANT REMEMBER how to install it!  Ive spent ages this morning trying to work it out.  :-\ Sorry to be a pain.  Please help.

And this also applies to the gifs of that are elsewhere in this post.  Once downloaded, so I just drop them over the top using FTP or something?

Thanks in advnace.  ;)
Title: Re: Australia Post shipping
Post by: scrappy on May 17, 2006, 13:55:02 pm
Okay, I think I doo just need to "drop" the files over the top via FTP.  I was re-reading this thread, and I noticed the permissions thing, and some of you changed paths for the images to show up etc.   Well, those images youre referring to dont show in my shop either, and I couldnt update them via FTP etc.  And I really dont know how to change the path etc.  So can someone help with that?  Is there a complete Aust Post component that includes all things to date?  I could just start again...
Title: Re: Australia Post shipping
Post by: laurie_lewis on June 04, 2006, 12:05:20 pm
I am not sure if it is just me but the module seems to be broken in two areas:-

1.  Not adding packaging fee if present
2.  Not adding tax if present

This appeared to be present in all the aus post areas I have activated - normal/express.

The original one supplied with Virtuemart does both these things. 

Wonder if anyone has been able to fix this up?

Laurie
Title: Re: Australia Post shipping
Post by: andimorton on June 22, 2006, 07:38:26 am
I love the module, but I am also having problems getting it to add the packaging fee. Any ideas anyone?

andi.
Title: Re: Australia Post shipping
Post by: andimorton on June 24, 2006, 06:54:44 am
I got my husband to fix the packaging part of the module. If I want to share the fix what do I do?  andi.
Title: Re: Australia Post shipping
Post by: laurie_lewis on June 24, 2006, 07:53:15 am
Hi,

I responded via PM to your message.  The best way to share it with everyone is to simply attach it to your next post in this thread.  Available in the Additional Options.  Will have to attach as zip.

Thanks from all of us.

Laurie
Title: Re: Australia Post shipping
Post by: andimorton on June 29, 2006, 06:01:00 am
sorry for the delay. Here it is. My husband fixed the tax thing as well apparently. Let me know if you have any problems with it.


[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: pyrotek on June 29, 2006, 09:50:02 am
Hello,

I've tried to get this module to work. I am getting this error :-

Start
__________________________

Warning: file() [function.file]: URL file-access is disabled in the server configuration in /var/www/onewednesday/htdocs/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 120

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=&Destination_Postcode=4011&Country=AU&Weight=1500&Service_Type=standard&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: no suitable wrapper could be found in /var/www/onewednesday/htdocs/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 120
Australia Post shipping calculator failed, reason:

___________________________________________
End

I know it’s something I am doing wrong...
But i am not sure what? Is it the way I’ve compiled php?
Title: Re: Australia Post shipping
Post by: andimorton on June 29, 2006, 14:23:29 pm
did you have this problem just with my version, or did you have it with the normal one?
Title: Re: Australia Post shipping
Post by: pyrotek on June 29, 2006, 14:49:29 pm
I had the issue with all versions.
I'd be working at all day
But in my php.ini
there’s a section called " Fopen wrappers"
Under that theres "allow_url_fopen" = yes/no
mine was set at NO
So i changed it to YES
all works its amazing what a bit of ice-cream can do for your brain!
Not sure if this is the way PHP is by default but I think a note in the readme would solve it :)

Thanks for your quick response!
Title: Re: Australia Post shipping
Post by: andimorton on June 30, 2006, 07:21:39 am
Because 'fopen' can pose a security risk my husband (guy - http://www.virtuit.com.au) made a new version that doesn't require fopen to be used. It's attached for those who want it.

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: pyrotek on June 30, 2006, 09:53:14 am

I'll give it a shot as soon as I get things back to normal :)
I'd be much happier knowing a possible security hole with the "fopen" is turned off.

Thanks!
Title: Re: Australia Post shipping
Post by: pyrotek on July 01, 2006, 10:30:16 am
Just disabled the "fopen" and using your new module it all works fine now. Everything shows as works as should :)

Thank you
Title: Re: Australia Post shipping
Post by: Abu Rashid on July 14, 2006, 06:47:26 am
just waondering if this updated version of the aussie post module has capacity to handle orders larger than 20kg? ie. by segmenting them down into 20kg boxes?

If not, has anyone considered doing this?
Title: Re: Australia Post shipping
Post by: Abu Rashid on July 26, 2006, 06:31:45 am
Well I ended up doing this one myself. Attached is my modification to accept multiple packages, by dividing the total order weight up into 19 kg chunks and then getting the cost from aussie post for each box, then outputting it to a table during checkout.

It's my first time using php so probably not very well written code but it does the job.



[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: Andrew on July 27, 2006, 08:07:07 am
Hi All,
Love the mod. However I have also got options for and turned on Standard shipping module. So the client can choose aust post or AAE or other. How do I make Aust Post shipping to be the default selected option and how do i add it to the table. Here is what it currently looks like: Thanks
(http://webhost-14.adam.com.au/~reptile/shiiping.gif)
Title: Re: Australia Post shipping
Post by: andimorton on July 27, 2006, 11:46:29 am
Yes, I'd like to know how to change the default shipping method too, but I've searched and not found anything yet  :(

andi.
Title: Australia Post shipping calculator failed, reason: Invalid Country Selected
Post by: markg on September 04, 2006, 06:15:08 am
Hi Guys
I've have an error message with the Aussie Post Module as uploaded to this thread by andimorton.

I've checked and rechecked the Country code for both the Vendor and the User.  Initally we were using the wrong units (gms and not g) however we're resolved that.

Strangely it seems that despite the error message below the calculations are working out ok.


standard service $4.80 (0.04 kg) - Est. delivery: 1 day(s)
express service $8.00 (0.04 kg) - Est. delivery: 1 day(s)
Australia Post shipping calculator failed, reason: Invalid Country Selected

Anyone else have a similar problem or know a fix?

Many thanks in advance.

Mark
Title: Re: Australia Post shipping
Post by: Scarlett on September 04, 2006, 08:29:44 am
I get the error with Austpost module....'Australia Post shipping calculator failed, reason: Invalid Country selected.

Both the store and my customer log in were in the same suburb and country, NSW and Australia. The only difference I have changed throughout is to use use state code 3.

Anyone got a fix on this?
Title: Re: Australia Post shipping
Post by: andimorton on September 09, 2006, 05:57:24 am
i'm not able to replicate this error on my own sites. would need more information to fix. thanks, andi.
Title: Re: Australia Post shipping
Post by: Scarlett on September 09, 2006, 07:31:21 am
Did you leave the state codes as 2?? I changed mine to show 3 ie. NSW VIC QLD

I thought that might be the problem, also I only get the standard post would like express to be an option as well.


If someone could explain their setup a little more, as in what they changed globally would help
Title: Re: Australia Post shipping
Post by: akj on September 19, 2006, 06:55:46 am
Love the Module, but something come up error 'Can't call function through static property in line (224 or 226)
It seems that the "get_ship_type_cost" cant be call for some reason.

Im using php 5.0.4 Apache 2.0xx. Joomla 1.0.11 and Virtuemaert 1.0.7

Help Please!!!!!!!!!!!!!!!!!!
Title: Re: Australia Post shipping
Post by: Scarlett on September 19, 2006, 08:36:53 am
akj, have you changed the state and country codes.  Austpost calls for 2 letter country code, yet 3 is the default and it seems that the state code is 2 by default and it needs to be 3.  Just a thought
Title: Re: Australia Post shipping
Post by: jasonrhl on September 22, 2006, 01:54:07 am
akj, have you changed the state and country codes.  Austpost calls for 2 letter country code, yet 3 is the default and it seems that the state code is 2 by default and it needs to be 3.  Just a thought

I get the Invalid Country Selected error and I dont understand what you mean by what you have said. its like it is a cryptic clue to me.


I would also like to send letter sized parcels that cost about a $1.00  I cant seem to get it to do this
I tried to install the auspost_shipping_module_modified_by_ChrisEwing version but it isnt set to use the fopen hack.

Thanks

jason
Title: Re: Australia Post shipping
Post by: jasonrhl on September 23, 2006, 14:14:07 pm
Please help someone :( Im pulling my hair out with this.

I have tried to convert auspost_shipping_module_modified_by_ChrisEwing to use fopen and I have failed. 5 hours of my life gone on this :p
Title: Re: Australia Post shipping
Post by: gorlaz on September 24, 2006, 08:15:57 am
Hey guys,

Great mod - it's working perfectly for me except the image icons. I save the files under shipping\images per instructions. I'm working on a standalone server at the mo, so I don't think I can check the 777, 755 stuff.

I'm getting the following piccy as output.

Wierd thing is that in VM > Store > Shipping module list > auspost, the pics don't appear, but if I open the auspost.php in Dreamweaver they are appearing!

Anyone know how to fix?

Cheers
Liam

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: gorlaz on September 27, 2006, 22:51:06 pm
Guys? Has anyone had this issue?
Title: Re: Australia Post shipping
Post by: gorlaz on October 02, 2006, 23:20:23 pm
Righto guys; post back about my above posts as follows;

* lines 252 (ish) re image references are to do with the admin backend. don't stress if these ones don't turn up
* line 150(ish) -
Code: [Select]
$html .= "\n<img src=\"/images/ship_images/auspost_".$service.".jpg\" alt=\"".$service." service\"><input type=\"radio\" name=\"shipping_rate_id\" id=\"auspost\" checked=\"checked\" value=\"$shipping_rate_id\" />\n"; was where my issue was. I replaced this with ;
Code: [Select]
$html .= "\n<img src=\"" .IMAGEURL."ship_images/auspost_".$service.".jpg\" alt=\"".$service." service\"><input type=\"radio\" name=\"shipping_rate_id\" id=\"auspost\" checked=\"checked\" value=\"$shipping_rate_id\" />\n"; and she works beautifully with the images in site\components\com_virtuemart\shop_image\ship_images (NOTE: No 'Administrator' in the path!)

This is all in auspost.php in site\administrator\components\com_virtuemart\classes\shipping. NOTE 'Administrator' in path...

Cheers
Title: Re: Australia Post shipping
Post by: Goonie on October 04, 2006, 02:53:55 am
I can not get this work with Vmart 1.07 + J1.011, tried all the versions from the start of this thread but always get the static call error pop up. On ortherhand the default Auspost module from Vmart 1.07 seem to work ok but no matter what i do, it does not show the correct cost for multiple items, shipping 1 item would cost the same with 3,4,5 etc and it break at 20KG limit.

Please help any one?

Title: Re: Australia Post shipping
Post by: spinfx on October 12, 2006, 05:23:22 am
Hi

Has anyone created a version of Ben's Australia Post Module that incorporates all of the addtional features in the versions posted?

It appears that each mod was made to Ben's original file(s) rather than making them cumulative. Surely development of this plugin would better serve the community if it was cumulative. We will try to do this, unless anyone else is already well on the way.

Also - I have noted that Australia Post returns an error saying the Econony service is no longer available.

Normal Airmail and Seamail still show, however, when despatching to an Australian Address, it shows an error regarding Air and Sea mail.

"Australia Post shipping calculator failed, reason: Invalid Country Selected
Australia Post shipping calculator failed, reason: Invalid Country Selected "

We are about to go live and have found that these errors have recently occurred so I wonder if there have been any changes at the Australia Post end.

Anyone have any ideas?

Cheers, David

PS: I have a Commonwealth Bank payment module that was created for us. I will be releasing it into the community shortly - please note that it needs some cleaning up.
Title: Re: Australia Post shipping
Post by: na3 on October 15, 2006, 09:21:32 am
Thanks to everyone for this shipping mod! I'm not new to Joomla, but am new to Virtuemart and php, and was going to have to learn php just to create a shipping calculator for Auspost.

However, I'm also getting the "Invalid country selected" error, and don't understand the above explanation of how to change the state codes to 3. Would someone please explain clearly on where to change this? Is it in auspost.php, or somewhere else?

Thanks!

Na3

Edit:

In regards to the above, I have managed to work out how to change the state codes to 3. Edit /administrator/components/com_virtuemart/classes/ps_html.php, changing all reference to state_2 to state_3. Then I went through and changed all the references (in that same file) from country_3 to country_2. No more error! Yay!

(The info was found at http://virtuemart.net/index.php?option=com_smf&Itemid=71&topic=16887.msg48200#msg48200).
Title: Re: Australia Post shipping
Post by: spinfx on November 08, 2006, 08:54:34 am
Hi Jason

Please help someone :( Im pulling my hair out with this.

I have tried to convert auspost_shipping_module_modified_by_ChrisEwing to use fopen and I have failed. 5 hours of my life gone on this :p

I think it would have been much easier to take Chris's quite small hack and incorporate it into the version of auspost already modified for "fopen" by Andi Morton's husband.

I'll get Chris to have a look at this for you - watch this post.

BTW- We're also getting issues with overseas addresses.

And just when we thought it was safe to go live - LOL

Cheers, David
Title: Re: Australia Post shipping
Post by: Mihir Patel on November 09, 2006, 04:24:22 am
hi guys,

   I am totally new to all this basically coming from designing background. We wanted starttrack express module on our website but being so complex gave up in the end. Now we wish to go for Auspost shipping calculator. can anybody please guide me on the easiest way to go for it. Thanks in advance

cheers,
mir
Title: Re: Australia Post shipping
Post by: Mihir Patel on November 13, 2006, 03:33:25 am
I had the issue with all versions.
I'd be working at all day
But in my php.ini
there’s a section called " Fopen wrappers"
Under that theres "allow_url_fopen" = yes/no
mine was set at NO
So i changed it to YES
all works its amazing what a bit of ice-cream can do for your brain!
Not sure if this is the way PHP is by default but I think a note in the readme would solve it :)

Thanks for your quick response!


hi i am having the same trouble but cant figure out what file do u mean by php.ini to locate fopen, i cant find any such thing in auspost.ini......where should i be looking for it

regards
Title: Re: Australia Post shipping
Post by: Mihir Patel on November 13, 2006, 03:56:53 am
Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=4169&Destination_Postcode=4102&Country=AU&Weight=2000&Service_Type=standard&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: Permission denied in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135
Australia Post shipping calculator failed, reason:

Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=4169&Destination_Postcode=4102&Country=AU&Weight=2000&Service_Type=express&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: Permission denied in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135
Australia Post shipping calculator failed, reason:

Warning: file() [function.file]: php_network_getaddresses: getaddrinfo failed: Name or service not known in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=4169&Destination_Postcode=4102&Country=AU&Weight=2000&Service_Type=air&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: Permission denied in /home/loot/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 135
Australia Post shipping calculator failed, reason:


hi guys,

   i am trying to work out the how to get the auspost module posted and updated by everyone in this forum but having lot of troubles. do we have a final version with all the problems solved like goods with no wt to goods with more than 20k. or could anyone post the module that they have used and is working fine. i cant figure out what file to look for to change permission to yes from no in 'fopen' please help me out i m stuck badly. thanks in advance.
Title: Re: Australia Post shipping
Post by: Mihir Patel on November 14, 2006, 08:10:24 am
OK

We've now added a minimum threshold so anything below that will not be sent to Australia Post for pricing.

The changes in each file are fairly minimal and in the auspost.php file are shown by the notation "added by Chris Ewing"

In the auspost.cfg.php file, there is just one line added that contains the hardcoded Threshold weight. Would be nice if this could be incorporated into the module configuration - any offers anyone?

I think it would also be useful to be able to set the postage rate (cost) in the module configuration for items weighing less than the threshold - and if set to zero, would just be the standard packing and handling charge.

Anyway, hope this mod is useful - the two modified files are attached - please be sure they meet your needs before using them as they are presented here with no guarantees - except that they work for us.

Cheers, David  :)

Hi David,

    I have looked at all the modules posted and tested it on my site. This is the only modification that gives accurate value as I tried the other modifications posted later and somehow they give you more postage costs than what drc or auspost charges you. now if someone could use the modification made by abu rashid into this module it might help us to calculate postages for products with wt more than 20kgs. I installed his modification and it works fine for any wt except that it gives wrong postage values as explained earlier. So anybody out there with technical skills and lil bit of time who could post the final update version? also is there a way by which you could get ride of the errors

Australia Post shipping calculator failed, reason: Invalid Country Selected
Australia Post shipping calculator failed, reason: Economy Air Parcel Post service is no longer available, please use other service type.

  inspite of error messages the calculations comes as accurate. i couldnt figure out how to solve that country code error...i tried changes as explained in this post but didnt help! hope someone can put the final version. thanks in advance.....its a great effort by everyone!

cheers,
mir
Title: Re: Australia Post shipping
Post by: en jie rudd on November 19, 2006, 10:45:06 am
In response to Mir's 2 questions :
1/ I got rid of the "Australia Post shipping calculator failed, reason: Invalid Country Selected" by assuming that Air service etc were not required IF the destination country was Australia and that standard and express service should only be used within Australia. So I then made the following mode to file  auspost.php :

      if ($Order_Country == "AU"&&Standard_Service) get_ship_type_cost("standard");
      if ($Order_Country == "AU"&&Express_Service) get_ship_type_cost("express");
      if ($Order_Country !== "AU"&&Air_Service) get_ship_type_cost("air");
      if ($Order_Country !== "AU"&&Sea_Service) get_ship_type_cost("sea");
      if ($Order_Country !== "AU"&&Economy_Service) get_ship_type_cost("economy");

2/ As for removing the second error, I modified  auspost.cfg.php as follows : define ('Economy_Service', '');

regards
prudd
Title: Re: Australia Post shipping
Post by: na3 on November 26, 2006, 01:13:21 am
I'm not sure if this is a completely noob question, but here goes...

I'm trying to add vendors to my site - a vendor will be in WA, while I'm in VIC. Is there any way to configure the module so that it calculates the postage based on where the vendors are in Australia, and have the vendors notified/paid via the site?

Or is this completely in the wrong part of the forum to ask?

Thanks,

Na3
Title: Re: Australia Post shipping
Post by: Mihir Patel on November 28, 2006, 06:50:55 am
Hi Na3,

   to calculate postage based on Vendor's address you just need to change the address details in the store summary. (got to components-virtuemart and then store - edit store click on store information) this can work if you have only one fixed vendor but for multi-vendor i am not sure, you might need to edit the code. since this module gets value from auspost website it seems less likely.....

cheers,
mir
Title: Re: Australia Post shipping
Post by: na3 on November 28, 2006, 08:16:49 am
Yes, sorry, I will be having multiple vendors. So your suggestion, while well-meaning (  :)   ) does not help me in this case. Anyone else have any ideas?
Title: Re: Australia Post shipping
Post by: stevescool2 on November 28, 2006, 14:56:24 pm
Hey,
I have been trying to use the auspost shipping module for a bit now, and it was working fine for the most of the day. However, it then started saying there was an error and giving no reason ( it was just blank after reason: ). Now when the user gets to the page where you select your shipping method it will sit there for ages and then

In FF: Ask where you want to save index.php
In IE: "Page cannot be displayed"

I have tried reimporting the database and replacing the administrator folder on the server from a backup and both have little/no effect.
Any ideas?
Title: Re: Australia Post shipping
Post by: spinfx on November 29, 2006, 05:58:07 am
We have the Aussie Post shipping module working perfectly and will re-post it soon.

Beneh and Uncle Buck (and others):  Please note that Economy Air is no longer offered by Australia Post

Quote
Australia Post recently announced changes to some international services.  A new service has been introduced which offers international customers basic tracking, signature on delivery and priority handling, and the Economy Air service is no longer available. To find out more about your international service options, enquire at your local Post outlet or call the Customer Contact Centre on 13 13 18. 

Taken from  http://www.auspost.com.au/BCP/0,1080,CH4381%257EMO19,00.html (http://www.auspost.com.au/BCP/0,1080,CH4381%257EMO19,00.html)


Australia Post will shortly be offering new services for overseas - please see http://www.post.com.au/BCP/0,1080,CH4035%257EMO19,00.html (http://www.post.com.au/BCP/0,1080,CH4035%257EMO19,00.html)

This means that the Delivery Rate Calculator at http://drc.edeliver.com.au/ (http://drc.edeliver.com.au/) will need to be updated/modified to reflect both of these changes before further modifications can be made to the Australia Post Shipping Module.

I have put in a request to eDeliver for them to contact me re updating their configuration details on the Calculator Site and am awaiting a response.

Some of the new overseas services offer order tracking and it would be great if this feature could be incorporated into the module to allow customers to check their orders.

Will report back when we have more details.

Cheers, David  :)
Title: Re: Australia Post shipping
Post by: Kkate8 on December 10, 2006, 07:28:44 am
I am wondering if you can help me please. I have moved my website from a FrontPage site to Joomla, well my developer did – until he went overseas and left me to finish. I’m struggling a bit.

He has downloaded and installed your aust post module 1.0.4. The problems I am having with it is that the calculations are not the same as if I go to the Aust post website – and in virtue mart the Aust post calculations don’t error out when the girth is too big for Aust post like the website does. It also doesn’t calculate (or recognise) when there is more than one product – the cost of freight doesn’t increase.

I use Aust post a lot and it would really help me to get this fixed – I can’t upload the new site until this is fixed L

Btw is their a later aus post module than the 1.0.4 pls?

 I aslo use fastway couriers as well as aust post.

Thanks in anticipation!

Title: Re: Australia Post shipping
Post by: Kkate8 on December 16, 2006, 10:32:50 am
Problem: the Aust post calculations don’t error out when the girth is too big for Aust post like the website does. It also doesn’t calculate (or recognise) when there is more than one product – the cost of freight doesn’t increase properly. I can have a product at 15 kilo and they charge is $6.55 ! what a bargain!

I use Aust post a lot and it would really help me to get this fixed – I can’t upload the new site until this is fixed L

Btw is their a later aus post module than the 1.0.4 pls?
Title: Re: Australia Post shipping
Post by: spinfx on January 12, 2007, 07:48:15 am
Hi Mir

Here is the version we have working well on our site (http://www.naturebase.net (http://www.naturebase.net)).

The error messages mentioned earlier have been fixed and we have also added a threshold for items <= the threshold limit in grams (this is configurable in the Auspost Shipping Module Configuration)

The reason we added this is that we have several items weighing <100g which would normally be sent letter post, but the Shipping Calculator does not offer letter post as an option.

What happens now is that if the total order weight is <=100g, the shipping module bypasses the shipping calculator and just charges the handling fee (in our case $1.00). This works for both domestic and overseas addresses.

We would also love to have an option for items such as subscriptions, which include postage, or downloads, which have no postage.
 
This would require a further modification to the script to perform a different taske

     if "item weight = 0" don't charge postage

but the trick is that you need to fool Virtuemart into believing that the user has selected a shipping method.

We will have a look at this next week sometime, but if in the meantime, someone could add all the additional mods spoken of here to this known working version, I think we will be close to satisfying everyone's needs.

So here, for now, is our latest fully working version as modified by Chris Cruz

Cheers all, David  :)


[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: stevescool2 on February 20, 2007, 10:14:28 am
According to Google:
Definitions of bump on the Web:
A raised metal feature on a die land or tape carrier tape that facilitates inner lead bonding.

Seriously now, has anything been done with this?
Title: Re: Australia Post shipping
Post by: fredzebu on March 18, 2007, 22:37:15 pm
installed vm1.07, then  Auspost_module_Modified_by_ChrisCruz.zip as attached to reply#95.
put handshovel in cart. please select a shipping method causes fatal error:

"Fatal error: Non-static method auspost::get_ship_type_cost() cannot be called statically in ......./administrator/components/com_virtuemart/classes/shipping/auspost.php on line 244"

The shop postcode is 2482, shipping address postcode 2482

any clues?

is there another version of the AP ship module that I should try?
Title: Re: Australia Post shipping
Post by: gavint on May 03, 2007, 01:18:25 am
Greetings,

I'm having problems with the auspost shipping module - I tried posting elsewhere but have gotten no response so I thought I would try here. I uploaded the 3 files into administrator/components/com_virtuemart/classes/shipping
but nothing saying auspost turns up under the virtuemart shipping admin menu nor anything in the user side when ordering a product. Is their a step I am missing ????



Title: Re: Australia Post shipping
Post by: gavint on May 03, 2007, 03:00:01 am
Ok- it seems to be listed under the Store-> Shipping Module list. But its not ticked. How do you tick and untick shipping modules??
Title: Re: Australia Post shipping
Post by: gavint on May 03, 2007, 03:14:00 am
ok- i think i have figured it out now  :)
Title: Re: Australia Post shipping
Post by: gavint on May 22, 2007, 07:19:46 am
Yikes- my auspost shipping has vanished- kind of. The files are still their everything appears in the backend but when doing a test order where it says 'Please select a shipping method' their is nothing listed.

Has anyone had this problem and/or have any ideas how to fix it???  ???

 
Title: Re: Australia Post shipping
Post by: Andrew Hill-Male on June 30, 2007, 10:09:54 am
Hi,

I am also in desperate need of a current version of Australia Post Shipping as I also get the 'Please select a shipping method' with the  Auspost_module_Modified_by_ChrisCruz.zip version.

Has there been any updates or can anyone provide a working version?

Appreciate your Help
Title: Re: Australia Post shipping
Post by: eedman on July 31, 2007, 04:55:09 am
can anyone tell us (me) how to implement the aust post mosule? do you have to install the standard module and then over write it with ChrisCruz' modifications? anyone....anyone...anyone?
Title: Re: Australia Post shipping
Post by: eedman on August 07, 2007, 10:58:56 am
...anyone? surely there are other Aussie who also sell internationally and use VM who have a working module?

Please, i for one am not asking for a free ride, just some help/guidence.

anyone out there?
Title: Re: Australia Post shipping
Post by: lumis on August 21, 2007, 12:28:08 pm
Hi,

I am also in desperate need of a current version of Australia Post Shipping as I also get the 'Please select a shipping method' with the  Auspost_module_Modified_by_ChrisCruz.zip version.

Has there been any updates or can anyone provide a working version?

Appreciate your Help

Ditto, i get a blank select shipper option using joomla 1.0.13 and vm 1.12
Title: Re: Australia Post shipping
Post by: ScooterP on September 14, 2007, 03:49:33 am
can anyone tell us (me) how to implement the aust post mosule? do you have to install the standard module and then over write it with ChrisCruz' modifications? anyone....anyone...anyone?
Hey eedman,

did you get an answer or work it out?

In my list of shipping modules I have the auspost hsipping module listed twice.  Does this make any diffference?  I only renamed the original auspost module files and copied the new ones into the directory. 

Cheers
Scott
Title: Re: Australia Post shipping
Post by: eedman on October 29, 2007, 02:24:28 am
I'll ask again.
...anyone? surely there are other Aussie who also sell internationally and use VM who have a working module?

Please, i for one am not asking for a free ride, just some help/guidance.

anyone out there?

Seems we are being left out in the cold because we arent living in the USA.
Title: Re: Australia Post shipping
Post by: spinfx on October 29, 2007, 07:23:56 am
Hi All

This is the last version we modified - please give it a go.

This one allows you to set the threshold weight at which it goes to the AusPost calculator (eg if weight >0 and <100 grams charge standard post&handling)

It also has a Post Included setting (eg for a magazine subscription payment that includes postage, set product weight to zero). This will bypass the calculator altogether for that item, but if other items are included, the weight will be added for those items only.

I hope that's clear.

This module is working fine on www.naturebase.net

Hope it works OK for you.

David

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: ScooterP on October 31, 2007, 02:17:50 am
Hey all,

I had an issue with some of parcels postage not calcuating properly.  My parcels are 600mm x 260mm x 260mm, 2000g and 600mm x 350mm x 350mm and weight 4500g.  I must be the only person using auspost for largish, heavish things.

What is found was in the auspost.php file the length, width and height dimensions were hardcoded at 250 rather than using the values that are set as the product dimensions in the database.

The comment in the file - //Auspost returns same value so long as this is valid ie between 100 and 500, so we use a fixed 250 as a placeholder - is incorrect as Auspost returns different values depending upon the L/W/H and the weight of the parcel.

Testing on Auspost webiste and the drc.edeliver.com.au I found that for parcel my sizes I needed my L/W/H values to be sent to drc.edeliver.com.au to calculate the correct postage.  THe results I was receiving from drc.edeliver.com.au were for L/W/H 250 and therefore my postage was incorrect.

Speaking to a programmer friend (infinitely more knowledge than me) we came up with 2 things:
1.  Someone really needs to sit down and rewrite the auspost.php file as it a mess.
2. The attached files are a hack that she came up with to get the product dimension set in the product setup to be sent to drc.edeliver.com.au and therefore return the correct postage.

You can ask questions but not any hard programmer ones as that is not what I am.

Things to note:
1. Has not been tested for multiple products
2. this is a quick fix that works for me and
3. Meaurements need to be in mm not cm


Cheers
P

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: eedman on November 01, 2007, 13:16:56 pm
SPINFX : that module runs perfectly You are a champion!

if anones interested heres the site, please dont do a purchase unless you want to as it is a live site.
www.airbrushmegastore.com

Yup its an Aussie site too!
Title: Re: Australia Post shipping
Post by: Fitness Central on November 12, 2007, 22:22:05 pm
Hi All

This is the last version we modified - please give it a go.

This one allows you to set the threshold weight at which it goes to the AusPost calculator (eg if weight >0 and <100 grams charge standard post&handling)

It also has a Post Included setting (eg for a magazine subscription payment that includes postage, set product weight to zero). This will bypass the calculator altogether for that item, but if other items are included, the weight will be added for those items only.

I hope that's clear.

This module is working fine on www.naturebase.net

Hope it works OK for you.

David


Hey I'm a noob - how do I install this shipping module?  Thanks
Title: Re: Australia Post shipping
Post by: Noosa on November 13, 2007, 00:50:25 am
Yes, This sounds like a great mod.

I am getting really frustrated just getting it installed and running:

I have uploaded the three files auspost.ini, auspost.cfg.php and auspost.php.

What are the settings to get this module to be used by the cart ?

For example in Admin/Configuartion/Shipping do I select 'Australia Post Shipping Module' or '     Standard Shipping module with indiviual configured carriers and rates. RECOMMENDED !'

I've searched around and cannot find a simple 'How to install and configure a new shipping module'.

Please if someone has time, just a step by step guide to get this great module installed and working ?

You'd make a lot of Newbs VERY happy.  ???
Title: Re: Australia Post shipping
Post by: ScooterP on November 13, 2007, 01:53:52 am
Hey Newbs,

Upload the files to /administrator/components/com_virtuemart/classes/shipping

Admin>Config>shipping tick the box for Australia Post.

Spinfx has an zip file is here somewhere that has the images for Australia Post.  You will just have to create the folder under shipping and upload them...

That is all you need to do...if your products dimensions and weight are correct you shouldn't have any problems.
Title: Re: Australia Post shipping
Post by: Noosa on November 13, 2007, 02:11:24 am
Yes ! I didn't believe it was so simple. Fantastic, and thanks to all concerned.

I'll go find the logos now, thanks again.

Title: Re: Australia Post shipping
Post by: Fitness Central on November 13, 2007, 03:28:12 am
Hey Newbs,

Upload the files to /administrator/components/com_virtuemart/classes/shipping

Admin>Config>shipping tick the box for Australia Post.

Spinfx has an zip file is here somewhere that has the images for Australia Post.  You will just have to create the folder under shipping and upload them...

That is all you need to do...if your products dimensions and weight are correct you shouldn't have any problems.

Thanks Scooter.  I did as you said and when I tested it out, it said "please select a shipping method" but nothing was available!  Does it take time to update or what?  Any ideas?  Thanks!
Title: Re: Australia Post shipping
Post by: ScooterP on November 13, 2007, 03:56:18 am
Quote
Thanks Scooter.  I did as you said and when I tested it out, it said "please select a shipping method" but nothing was available!  Does it take time to update or what?  Any ideas?  Thanks!

It should be instantaneous.
if you are using my auspost files your product dimensions need to be in mm's not cm's.
Check that you are not breaking Australia Post's girth rules - ie girth cannot be greater than 140cm.  Length cannot be greater than I think 105cm.
Cannot think of anything else at the mo...but if I do I will update
Title: Re: Australia Post shipping
Post by: Fitness Central on November 13, 2007, 04:07:55 am
I found the problem - I hadn't set a postcode for the store.  Working now.  Thanks so much!
Title: Re: Australia Post shipping
Post by: ScooterP on November 13, 2007, 04:13:55 am
well that would be one of the other things....
Title: Re: Australia Post shipping
Post by: Newms on December 10, 2007, 23:31:40 pm
Hi to all!

Seems like a great module very usefull?

Does it deal with cubic weight?
Does it deal with option cover (insurance) for both domestic and iternational??

Cheers
Title: Re: Australia Post shipping
Post by: shadowuk on January 05, 2008, 12:36:55 pm
Hi

I've been looking for something like this for a new site - I downloaded th zip file Auspost_311007 and it contained 3 files - auspost.php - basket.php - checkout.index.php

Are these all I need and if so where do I upload them to.

Any help appreciated.

Thanks

Mike
Title: Re: Australia Post shipping
Post by: ScooterP on January 06, 2008, 11:11:17 am

Are these all I need and if so where do I upload them to.
Check reply 113...it is one of the simplest bit of virtuemart
Title: Re: Australia Post shipping
Post by: shadowuk on January 11, 2008, 12:29:37 pm
I did as suggested in post 113 but am having problems as if there are 2 or more items in the cart it either offers no shipping options to select OR shows the options but with the price for just one packet.  This may be my fault - I may have entered weights or sizes wrongly but before I carry on investigating could someone please just tell me the following.

A link to the latest version of an AusPost shipping calculation module  (The forum seemed to have several being developed and I want to make sure I have the right one).

The site will only be shipping within Aus and the items for sale are either 20kg, 10kg, 3kg or 1k ( or a combination of some of these), and each is a seperate package for shipping.

Thanks for any help anyone can offer.

Mike
Title: Re: Australia Post shipping
Post by: ScooterP on January 13, 2008, 22:54:07 pm
Ahh...yoiu see that is the problem I found.  I think it takes the W/D/H dimesions of the last item in the cart and adds up the weight of all the itmes  (well it does on my auspost files because the W/D/H dimensions are not hard coded any more).
The shipping module cannot calculate shipping for each seperate package, it only does as above.

The reason why you are not getting results maybe because the dimensions and/or the weight is to great.  Check out the info from Australia Post at http://www1.auspost.com.au/pac/aus_parcel.asp and run some checks. The girth of the parcel cannot be greater than 140cm. Since it works on cubic rule you can have the same dimensions but different weights and still return the same shipping rate.  Eg.  I send boxes 600x260x160 and with these dimensions I can send up to 11kg.  So any weight upto 11kg will return the same shipping rate eg 2kg is the same as 10kg.

I am working on 2 solutions - either
1. module calculates shipping on each items and then adds the shipping totals together; or
2. module calculates shipping based on the highest W/D/H and the total weight of all items.
IF i come up with a soloution I will post a new thread with the files and the details of what it does.

Cheers Scott
Title: Re: Australia Post shipping
Post by: Michelle Stevens on January 17, 2008, 06:26:44 am
I've installed the files and can set the shipping methods, but during the checkout it asks for us to set a shipping method, but you can't select anything?

Can anyone help? I have set the postcode in the store properly.
Title: Re: Australia Post shipping
Post by: Simon A. on February 05, 2008, 18:53:09 pm
Michelle: Check your webserver's error log logfile. Also, try turning on debugging mode from the Path & Url configuration tab (Admin Menu | Configuration | Path & URL tab; check DEBUG box, click Save).
Title: Re: Australia Post shipping
Post by: Mike Sturmey on March 05, 2008, 02:51:38 am
Hi,

I have realised that the standard parcel post is $4.00 for Australia wide under 250g but I want to use prepaid satchels which cost $5.50. The simplest way would be just to add $1.50 to the handling fee, however, this would of course add this fee to all postal rates which I do not want to do - my php is not very good - does anyone know how (and where) I would add a code modification to say something like:

If the shipping service = standard then standard shipping cost = standard shipping cost + 1.50

Even better - if I were able to duplicate a category - so have "Standard Shipping 1" and "Standard Shipping 2" then the standard 2 service could have the standard cost plus $2.70 added to it and then it would become registered post - which would be great as auspost provide no parcel tracking on standard mail,

Any ideas?

regards

Mike
Title: Re: Australia Post shipping
Post by: wmakara on May 08, 2008, 09:47:58 am
Hi,

I have installed the auspost module and images.  I'm unable to get the images working yet. 

After reading all these posts, does anyone have this working completely?  EG. have rates for std, express, international plus tax rate to apply only to Australia and not to the rest of the world.

If so, could you either zip the files or explain the coding (I'm not a coder).  At the mo, when I go through checkout it only offers me Australia Post standard.

I appreciate any help.

Thanks
Wendy
Title: Re: Australia Post shipping
Post by: 72dpi on May 19, 2008, 04:47:24 am
This one actually needs updating, as I don't think the release version takes into account zero weights.
We have been using an upgraded version of this module, and it works perfectly.
I will look @ the differences in the versions, and if ours is better, will upload it, and hopefully, it can be used as default download.

Cheers
Title: Re: Australia Post shipping
Post by: andimorton on May 19, 2008, 05:28:41 am
I have just been having an issue with the Auspost module on Joomla 1.5 with the latest release of Virtuemart not accepting greater than 4 number postcodes. I realised that there are only a few shipping options I needed so I just ended up using the Standard Shipping module that comes with virtuemart and added my own values. This way I quote on Satchels for 500g and 3kg and small and large letters, and have made overseas versions of the above weight ranges which I've averaged out between the cost to ship to US and the cost to ship to UK.

You could add registered and unregistered versions of the cost too. In virtuemart it comes up as whatever you called the shipping cost - ie Large Letter, Large Letter Registered, etc. It's probably the simplest way to get all the options you want, but you'll need to keep an eye on Auspost rates and update manually accordingly.

Hi,
I have realised that the standard parcel post is $4.00 for Australia wide under 250g but I want to use prepaid satchels which cost $5.50. The simplest way would be just to add $1.50 to the handling fee, however, this would of course add this fee to all postal rates which I do not want to do - my php is not very good - does anyone know how (and where) I would add a code modification to say something like:
If the shipping service = standard then standard shipping cost = standard shipping cost + 1.50
Even better - if I were able to duplicate a category - so have "Standard Shipping 1" and "Standard Shipping 2" then the standard 2 service could have the standard cost plus $2.70 added to it and then it would become registered post - which would be great as auspost provide no parcel tracking on standard mail,
Any ideas?
regards
Mike
Title: Re: Australia Post shipping
Post by: aussieute on May 26, 2008, 04:43:31 am
This is getting really confusing here as in consecutive posts we have 2 downloads  which are from my quick view totally different.

Auspost_module_version1.12.zip - spinfx
  austpost.cfg.php - 1kb
  austpost.ini - 1kb
  austpost.php - 17kb

Auspost_311007.zip
- ScooterP
  austpost.cfg.php - 18kb
  basket.php - 12 kb
  checkoutindex.php - 14kb

I'm trying to follow this thread to get any AustPost shipping module working and am getting nowhere fast.

I'm running J 1.5.3 and VM 1.1.0

Do either of these actually work with this combination?
Does anyone actually have them working with this combination?
If not can anyone help me do so?

Obviously the shift to J1.5.3 and VM 1.1.0 is fraught with all sorts of problems (http://forum.virtuemart.net/index.php?topic=40360.msg129051#msg129051) :'(
 
Title: Re: Australia Post shipping
Post by: andimorton on May 26, 2008, 05:26:19 am
j 1.5 and v 1.1 don't work.
Title: Re: Australia Post shipping
Post by: aussieute on May 27, 2008, 02:33:50 am
andimorton can you explain further please?

I'm not sure how you read this but I figure it's pretty plain .. what are you reading that I'm missing  :-[

Packages (http://virtuemart.net/index.php?option=com_content&task=view&id=293&Itemid=57)
VirtueMart 1.1.0 supports Joomla! (1.5 and 1.0.x) and Mambo.
Separate installation packages are available for Joomla! 1.5 and Joomla! 1.0.x/Mambo.
Title: Re: Australia Post shipping
Post by: andimorton on May 27, 2008, 02:56:57 am
We're talking about the australia post shipping module, yes? well it doesn't work in j1.5 and v1.1...
Title: Re: Australia Post shipping
Post by: aussieute on May 27, 2008, 22:42:36 pm
gotcha ... I've got other issues happening with VM and got confused  ???

Even so my question still applies which one actually works given the huge variation between them?

Anyone looking at upgrading this?
I'm not a code but can contribute other ways  ;)
Title: Re: Australia Post shipping
Post by: andimorton on May 27, 2008, 22:53:07 pm
my husband is going to look at it for me sometime soon... what can you contribute?
Title: Re: Australia Post shipping
Post by: aussieute on May 28, 2008, 00:48:41 am
I'll PM you when I get the following pressing issues resolved ...

The MIGS Mastercard file doesn't like J1.5.3 + VM1.1.0 (http://forum.virtuemart.net/index.php?topic=40360.msg129064#msg129064)
Getting some issues with some tables not installing (http://forum.virtuemart.net/index.php?topic=40899.msg129210#msg129210)
Ya gotta love it <grin>
Title: Re: Australia Post shipping
Post by: ksper on July 06, 2008, 10:29:10 am
Hi everyone !

What a good job this module. Thanks a lot to every contribuors.
However I am using Joomla 1.5 and Virtuemart 1.1.0, and it doesn't seem to work properly.

Does anyone find a solution for this version ?

 ???

Title: Re: Australia Post shipping
Post by: andimorton on July 06, 2008, 11:51:52 am
what's the problem you're having?
Title: Re: Australia Post shipping
Post by: ksper on July 07, 2008, 02:06:17 am
Hi,
Actually I download the version on this page : http://forum.virtuemart.net/index.php?topic=8908.105 (the spinfx one)
I put all the files in the good foler. It seems to work, but as I have some big items which exceed the limit size of the Auspost, sometimes the result is wrong. (because of the placeholder added manually in the file)
So I tried the ScooterP version (just 1 or 2 port after) when try this version nothing happens. I mean, nothing appears on the shipping cost page. There is just a blank space instead.

Perharps I should try another version but the other one seem to be older. I affraid to put the mess with all my tests.

Any ideas are welcome ?
Thank you
Title: Re: Australia Post shipping
Post by: ScooterP on July 10, 2008, 06:35:21 am
Hi ksper,

It does sound like the weight limit for australia post is being exceeded and therefore the results can not be displayed as nothing comes back from Auspost.

I suggest you enter values into the auspost url calculation (http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=2000&Destination_Postcode=2040&Country=AU&Weight=2000&Service_Type=standard&Length=200&Width=200&Height=200&Quantity=1) and see when it cannot display rates (change the values, weight is in g's and dimesions are in mm's). At that weight create a standard shipping rate.

As explained earlier there is a couple of problems with how the shipping is calculated but that is only happening with multiple items in the cart (which I can live with).

Later
Title: Re: Australia Post shipping
Post by: johk on July 14, 2008, 14:23:31 pm
Will this shipping module work with VM1.1?
Thanks
jonas
Title: Re: Australia Post shipping
Post by: anthony on July 31, 2008, 08:21:27 am
See attachment for Aust Post icons, and read below for some useful hacks.
 
johk - this shipping module comes with VM 1.1.x, and it seems to mostly work ok - at least from my initial look (my site is not in production yet).
 
More about the icons - I searched everywhere for a copy of the correct icons to use, but couldnt find any! I made these up myself - in a bit of a hurry - so they may not be the correct official icons, but good enough for me.
Just upload the "images" folder to:
/administrator/components/com_virtuemart/classes/shipping/
 
Useful Hacks
prudd (http://forum.virtuemart.net/index.php?topic=8908.msg55133 (http://forum.virtuemart.net/index.php?topic=8908.msg55133) - page 6 of this thread) had a very useful hack that I'll post again here. It resolves the annoying problem where error messages are displayed to customers when innapropriate Aust Post delivery options are listed.
 
For example - an overseas customer gets a message "not available to this destination" next to the icons that relate to the postal services for within Aust. Thats actually not too bad, but why show them the option at all?
 
Much worse is when Aust customers see  "Australia Post shipping calculator failed, reason:..." Im not sure why they couldnt see the same error message as what O/S customers see, but anyway, theres no reason to display options that are not relevent to them. I especially dont want them to see anything that hints that something has 'failed'.
 
So these were nicely addressed by prudd, and I'll give a little more detail here:
In
/administrator/components/com_virtuemart/classes/shipping/auspost.php
find
Code: [Select]
if (Standard_Service) get_ship_type_cost("standard");
if (Express_Service) get_ship_type_cost("express");
if (Air_Service) get_ship_type_cost("air");
if (Sea_Service) get_ship_type_cost("sea");
if (Economy_Service) get_ship_type_cost("economy");
replace with
Code: [Select]
      if ($Order_Country == "AU"&&Standard_Service) get_ship_type_cost("standard");
      if ($Order_Country == "AU"&&Express_Service) get_ship_type_cost("express");
      if ($Order_Country !== "AU"&&Air_Service) get_ship_type_cost("air");
      if ($Order_Country !== "AU"&&Sea_Service) get_ship_type_cost("sea");
      if ($Order_Country !== "AU"&&Economy_Service) get_ship_type_cost("economy");
 
Other notes
Dont forget to disable the Economy Service (via the config options in admin) - no longer offered by Aust Post.
Reading earlier posts, I think some people had a problem with the image path being too long when using ssl. Not sure how that would be a problem, but keep in mind if the images dont show. I dont use ssl at the moment so cant verify.
 
I found the current 'stable' VM 1.1.1 incredibly buggy. It was doing my head in - one problem after another. The nightly build however is (so far) another matter. It seems much better. So I would recommend that you dont waste your time trying to fix 1.1.1 - give the nightly build a go.
https://dev.virtuemart.net/cb/proj/doc.do?doc_id=1328
 
Wish List
Insurance options
 
Thanks to everyone who has made this possible.


[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: aceantman on August 07, 2008, 14:15:10 pm
HI Guys here relative new here, do i need this  to add to my shop,
I sell model trains and sometime up to 6 items can go by letter rate, most are parcels
I am using joomla 1.5.5 and vituremart 1.1.2. I need to add insurance as well
optional buyers pic or set as default .
,packing fee and really don't know how to set it up

I need the updated version and need to know how to changes dimensions to mm and grams. I don't really want to fiddle with code as i am New and just getting my shop up and running
Thanks for you help. My site is http://trainsforyou.com
thanks in advance It's an awesome job you are doing,
Anthony
Title: Re: Australia Post shipping
Post by: jess116 on August 08, 2008, 18:17:31 pm
Hi all, I was just having trouble with the aust post shipping module not accepting postcodes with anything but 4 digits (this is just since upgrading to the latest version of virtuemart), and just installed the Auspost_module_version1.12.zip that is available on page 8 of this thread, and i think it has fixed my problem!!! I haven't had any orders to confrim that it is working, but i did a dummy order and it seemed to be working there!!  YAY!!  Just wanted to record that here for anyone else with the same problem
Title: Re: Australia Post shipping
Post by: jodarf on August 25, 2008, 11:13:13 am
Hi - One of my customers had a need to allow his customer to send things overseas with the Aus Post shipping module, so made some changes and it now allows International Express Post, Air Post, Sea Post.  This allows you to turn them on and off in the config area and also Auto hides the local Standard and Express post costs for o'seas shipping locations.

For you developers - It could be slightly tider code - but I was in a rush...

It is a modification but I wanted to keep the existing one in place so I renamed it.
Just copy the 3 files to the correct location and it all go.

http://www.idomain.com.au/downloads/auspost_oseas.zip
Title: Re: Australia Post shipping
Post by: laurie_lewis on August 26, 2008, 05:20:18 am
Hi Jodarf,

I like the quick and dirty mod for overseas.  I had a quick look at it today and tried to be even dirtier and attempted to put insurance parameters into it, so a user can select if they want the item sent with or without insurance from Australia Post.  Added a lot more parameters to differentiate domestic and international shipping.

In the calculations, since Insurance or extra cover as they call it now, comes in lots of $100 up to a max of $5000 it always figures out insurance to the next $100 level.  Item costs $199 - Insurance for $200 - but Item costs $101 item is still insured for $200.  Also it does not take into account the insurance issues with some countries, but meets my little needs.

Not a good programmer so yell if you find any errors,  yell to let other users know how to fix it that is ;D ;D ;D .

Would look a lot better with embedded images etc.

All the best.

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: Ozpoker on September 02, 2008, 03:41:01 am
Okay this is doing my head in - there is so many diff. version running around I can't keep up.

I get this message from mosty of the version and they only let me access the config page once  : 

"/home/xxxxx/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.cfg.php :: Writeable"

"Shipping Module Configuration: auspost.php"

"Direct Access to this location is not allowed."

If I try to run a product through checkout it stalls at the "select shipper" stage.

Running VM 1.1.2 and Joomla 1.5.6

Is there a working Australia Post version for this config ?

I do not want an fopen version (security risk) - I need a cURL version to use.

Anyone please help ?

Title: Re: Australia Post shipping
Post by: Ozpoker on September 05, 2008, 02:57:42 am
Anyone around to help ?
Title: Re: Australia Post shipping
Post by: Christabelle67 on September 12, 2008, 06:20:00 am
Hello, could someone kindly advise is there a way to make Registered Post as compulsory into this module rather than the Standard Post only?  I would like to offer this for Customer Peace of Mind.

I am using Joomla 1.0.12 and VM 1.0.15

Appreciate if anyone could help me or point me in the right direction.
Warm Regards
Christel
Title: Re: Australia Post shipping
Post by: laurie_lewis on September 12, 2008, 14:31:52 pm
Just cut out the code for standard post.

Title: Re: Australia Post shipping
Post by: Christabelle67 on September 12, 2008, 17:05:36 pm
Hello Laurie_lewis

Sorry I do not understand fully, what do you mean by cut out the code and which code specifically and in what file?

Will this show up as "Registered Post" or do I need to implement that into the code somewhere?
Appreciate your response.
Warm Regards
Christel
Title: Re: Australia Post shipping
Post by: jodarf on September 14, 2008, 03:51:55 am
Okay this is doing my head in - there is so many diff. version running around I can't keep up.
I get this message from mosty of the version and they only let me access the config page once  : 
"/home/xxxxx/public_html/administrator/components/com_virtuemart/classes/shipping/auspost.cfg.php :: Writeable"
"Shipping Module Configuration: auspost.php"
"Direct Access to this location is not allowed."
If I try to run a product through checkout it stalls at the "select shipper" stage.
Running VM 1.1.2 and Joomla 1.5.6
Is there a working Australia Post version for this config ?
I do not want an fopen version (security risk) - I need a cURL version to use.
Anyone please help ?

Yes there are a number of versions around, as there are a number of requirements.  The version I use is the last mod from Laurie Lewis - This works well with the insurances.

As for the fOpen - as this config page will not be changed much, edit the config file and upload it.  I think your alternative is to find someone to make the change to the code.  Have a look at the Joomla post on this topic
http://forum.joomla.org/viewtopic.php?f=231&t=263946&p=1206720&hilit=fopen+curl#p1206720
Title: Re: Australia Post shipping
Post by: jodarf on September 14, 2008, 04:12:37 am
Hello, could someone kindly advise is there a way to make Registered Post as compulsory into this module rather than the Standard Post only?  I would like to offer this for Customer Peace of Mind.
I am using Joomla 1.0.12 and VM 1.0.15
Appreciate if anyone could help me or point me in the right direction.
Warm Regards
Christel

Christel - Simply use the version from Laurie in this post and go in to the Configuration then remove the Standard option (Virtuemart/Store/Shipping Module List/auspost_oseas).  You will then get 2 options - 1 with insurance the other without for Express Post.  If you do not want insurance then use the version from me in this post.

The overseas costs will only apply if the user has a different country in their shipping address.

NOTE: Make sure you use the 4 step shopping cart - as the user must select their shipping address prior to the calculation - that is if you allow multiple shipping addresses.
Title: Re: Australia Post shipping
Post by: Christabelle67 on September 16, 2008, 10:12:41 am
Dearest Jodarf

Thank you so much for taking the time to respond with your advise, I greatly appreciate you doing this :)  I will give it a go and post back the results.
Have a great evening :)
Warm Regards
Christel
Title: Re: Australia Post shipping
Post by: Christabelle67 on September 16, 2008, 13:26:19 pm
Hello Jodarf

Hubby downloaded the module from Laurie which has brought up two standard options (below).  I am only selling my products Australia wide and would really like to not give my customers the option of standard post (no insurance) and offer only standard post (with insurance) for Customer Peace of Mind.  As well as the option of Express Post (Australia Wide).  Is it possible to achieve this? 

Appreciate any assistance.
Warm Regards
Christel
Title: Re: Australia Post with Registered Post
Post by: Christabelle67 on September 16, 2008, 14:36:53 pm
Hello

Hubby has fixed the issue I was having!  Thank you Laurie_Lewis for providing your fantastic mod, hope you don't mind my hubby slightly modifying this to meet my needs :)  Will add the zip file to if any other members find it is what they are after.

It is for people selling products in Australia who want their shipping to include Compulsory Registered Post for Customer Peace of Mind, they are not given the option to choose unregistered post.  Customers can also choose Express Post, please note, Express Post across Australia does not have insurance, you have to use Standard (with insurance included) as this is there (Auspost) policies.  This mod can be used both Australia wide and Internationally.

2 Options Available:

1 = Standard Post (With insurance included)
2 = Express Post (No insurance)

To Add this:

1.  Save zip file attached to this post onto your PC.
2.  Unzip the file, (3 files inside)
3.  Upload to your virtuemart on your host: public_html/shop name/administrator/components/com_virtuemart/classes/shipping
4.  Once uploaded go into admin of your VM shop (backend) click on Store Summary, Configuration, Shipping and enable the Auspost Shipping Module modified to allow additional postal methods including Express Post.  Outside of Australia Post is now catered for.  Untick the other Australia Post module.  SAVE.
5.  Go to Store, Shipping Module List, Auspost_Reg Shipping Module, click on configure ship method and add your handling fees etc if required, but don't touch Registered Mail lodgement cost and Registered Mail extra covered unit cost, as they are already set up.

NOTE:  If you want to use both Standard with and without Insurance remove the comments (/*) on line 154 before total_shipping_handling and on line 163 after 1 - remove the comments also (*/) in auspost_reg.php file.

Warm Regards
Christel & Kevin

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: laurie_lewis on September 17, 2008, 06:21:37 am
Sorry for not getting back to you earlier Christabelle67.  I thought I should put in that you can choose the option to get insurance or no insurance with all of them, so I did a quick (or not so quick) alteration.  Have not tested it greatly either.

I also added in that you can put in the costings for delivery confirmation and also person to person delivery in Australia and Delivery confirmation overseas.

It is still a hack and I am sure that someone far more knowledgeable would be able to decrease the amount of code in it.   

If the overseas delivery option is not available it will not bring up an error message - just for looks.  The error message can be displayed by simply un-commenting the lines in the code for the error messages.  Also just make sure that if you are not having delivery confirmation built in then change it so that it equals 0 for the maths.

Next option for me is to add some images into it so it is a bit prettier.

It would be great if someone could take all the little modifications and build them into one comprehensive module.  It would take a fair bit of configuration options but would be great if it could be done.

 

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: Christabelle67 on September 17, 2008, 07:47:01 am
Hello Laurie_Lewis

Thank you for your post, this is what I love about Open Source, everyone pulling together to help each other for the same great cause!  Its fantastic!  Big Thumbs Up to everyone's contributions to this awesome mod!  One we all appreciate, us for sure :)

If I could configure the code, like many others, I would not hesitate but em, that leaves me out of the piccie...

Thank you for your extra contributions again.
Warm Regards
Christel
Title: Re: Australia Post shipping
Post by: iMurray on October 16, 2008, 05:33:09 am
Appreciate your efforts this file... looks like it worked well for me. Would be nice to have the images incorporated too. :)
Title: Re: Australia Post shipping
Post by: Scrap on December 10, 2008, 02:10:45 am
I have been having trouble with the Aust Post module.  Posting in Australia is OK, international post codes are not accepted, test orders are producing an error at checkout that the postcode is more than 4 digits long.

I read in a previous post that installing Auspost_module_version1.12 fixed this but this has not been the case for me.

I only want to ship to the US, UK, Canada and NZ.  Any help would be appreciated.

Running Joomla 1.5.8 and VM 1.1.2.

Thanks in advance J.
Title: Re: Australia Post shipping
Post by: jodarf on December 10, 2008, 12:43:32 pm
I have been having trouble with the Aust Post module.  Posting in Australia is OK, international post codes are not accepted, test orders are producing an error at checkout that the postcode is more than 4 digits long.
I read in a previous post that installing Auspost_module_version1.12 fixed this but this has not been the case for me.
I only want to ship to the US, UK, Canada and NZ.  Any help would be appreciated.
Running Joomla 1.5.8 and VM 1.1.2.
Thanks in advance J.
The version modified in this posting allows for non Australian post codes.
Title: Re: Australia Post shipping
Post by: Scrap on December 11, 2008, 05:55:52 am
Hi,

When I install Austpost_module_version1.12 it causes the following checkout error for Australian and overseas customers at Step 2:

"Please select a Shipping Method.  Direct Access to this location is not allowed."

My parcel weights and sizes are within the limits, not sure what to try next??

Thanks for helping.

J.
Title: Re: Australia Post shipping
Post by: Scrap on December 11, 2008, 11:47:21 am
OK turns out that module won't work with Joomla 1.5.8 UNLESS I run it in "Legacy Mode".

Does anyone know if there is an Australian shipping module that will work for VM 1.1.2 and Joomla 1.5.8 without having to run Joomla in Legacy mode?

Title: Re: Australia Post shipping
Post by: Tirrawarra on February 18, 2009, 15:16:56 pm
Hello! Im using Joomla 1.5.9 & VM 1.1.3 - is there a post on how to hack  these newer versions (or better still a mod) on how to add the extended AustPost images express / sea etc? ta!
Title: Re: Australia Post shipping
Post by: curlz on April 01, 2009, 04:29:02 am
Hi I am working with J1.5.9 and VM1.1.3

I am struggling with Australia post shipping on a couple of sites now. It did work really well until recently
My error is

Warning: file() [function.file]: URL file-access is disabled in the server configuration in /home/nmwcom/public_html/s1/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 43

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=2298&Destination_Postcode=2303&Country=AU&Weight=1000&Service_Type=standard&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: no suitable wrapper could be found in /home/nmwcom/public_html/s1/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 43

Warning: file() [function.file]: URL file-access is disabled in the server configuration in /home/nmwcom/public_html/s1/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 43

Warning: file(http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=2298&Destination_Postcode=2303&Country=AU&Weight=1000&Service_Type=express&Length=250&Width=250&Height=250&Quantity=1) [function.file]: failed to open stream: no suitable wrapper could be found in /home/nmwcom/public_html/s1/administrator/components/com_virtuemart/classes/shipping/auspost.php on line 43

I have tried uploading the modified auspost files and the error message just became longer.
Any advice here please
Cheers
M
Title: Re: Australia Post shipping
Post by: eristoffsydney on April 29, 2009, 10:45:56 am
Hello,

I have just installed the Australia Post shipping on Virtuemart and I think it's great ! I only got one problem : our products are usually sent in an envelope but when I try to order one of our product (we put the right dimensions and weight) it's a minimum of $5.20 for the shipping cost.

I think that it comes from the fact that it's business shipping. Can we set an "ordinary" shipping ? Generally we just send our product with a 50cent envelope.

Thanks in advance,
Loïc
Title: Re: Australia Post shipping
Post by: wmakara on August 13, 2009, 09:46:26 am
Hello Laurie_Lewis,

I just want to thank you for your modified auspost module. 

When I first set up my website, I couldn't get the auspost module to work correctly.  As mentioned in earlier posts, it wasn't recognising international postcodes.

At the time, no one had any solutions, so I had to use the default shipping module whereby I had to enter each individual rate for standard, express and international rates.  You can't imagine how long and tedious that was to do. 

To cap it all off, each year I had to update all the rates when Australia Post changed their rates each 1 July.

This didn't even take into account insurance.  I was going to have to do all the rates again but add the insurance costs.

So only the other day I did some searches on this module and came across your modified one.

I have uploaded and it's working exactly how I wanted it.  Now all I have to do each 1 July is update a few figures in the cfg.php file.

So THANK YOU, THANK YOU, THANK YOU for making my life so much easier.

However, just one thing - I didn't see the delivery confirmation fees come up.  I know you did say in your post that you had added it but hadn't tested it.

This is no major biggie for me, as I'm sure not that many people will opt for it but all the same, if you have got it working, I would love a copy of your files.

Thanks again and a BIG THUMBS UP for all your effort to help us out.

Kindest Regards
Wendy
Title: Re: Australia Post shipping
Post by: MoneyMagnets on October 17, 2009, 23:36:43 pm
A BIG thank you to all the contributors on this thread.

I was about to say that the prices didn't match with Aus post but I had forgotten to take into account the handling fee on the shipping! Doh!  ;D

So thank you everyone I now have a working Aus post calculator and my client will be soooo happy!

Regards,
Karen
Title: Re: Australia Post shipping
Post by: outlawtorn on October 26, 2009, 12:44:02 pm
I have uploaded the files, configured the shipping module to auspost and set the checkout structure and product dimensions and weights - but it will not pick up a shipping charge in the checkout process.

I have changed to flex shipping and it still doesn't... very frustrating.  Any Ideas

Title: Re: Australia Post shipping
Post by: baldcat on November 10, 2009, 12:28:33 pm
I have uploaded the files, configured the shipping module to auspost and set the checkout structure and product dimensions and weights - but it will not pick up a shipping charge in the checkout process.

I have changed to flex shipping and it still doesn't... very frustrating.  Any Ideas



I think I'm having the same issue.. When you get to step 2 shipping the frame is just blank ?? Well thats what I get.. Really frustrating.. Have the same setup on another site, but with demo items and it works like a treat.. 1.5.14 / 1.1.4
Title: Re: Australia Post shipping
Post by: markspillane on November 10, 2009, 13:56:25 pm
Hi all.

I am a little confused with all the mods here, and need something that will allow buyers to select from the following Australia Post options:

Standard Post
Standard Registered Post

Express Post
Express Registered Post

International Standard Post
International Registered Post

and these options with or without insurance.

Is there anything available that does this? Ive tried a few but the registered post doesnt seem to be an option users can select?

Joomla 1.5

Title: Re: Australia Post shipping
Post by: Rockbox on November 15, 2009, 23:50:30 pm
Hello everyone and anyone.
I'm looking for a solution to the following:
I'm using VirtueMart 1.1.4 stable with auspost_oseas
Configure Ship Method    1.0.5    Ben Wilson - Modified by iDomain    idomain.com.au 
The problem I'm having is:
If a customer purchases multiple items in the one checkout, the sum of the weights of these items are calculated together.
My product "The Rockbox" www.rockbox.com.au is quite large and needs to be shipped separately and have individual shipping charges.

Is this possible to achieve?

All help is much appreciated.
Regards

Steve
Title: Re: Australia Post shipping
Post by: mcalexy2k on November 29, 2009, 09:36:46 am
Dear All,
I saw somany users contribute for this auspost module during last few years.
But last versions in this module had a issue. AusPost support only upto 20kg parcels and if order weight more than that then it returns "Invalid weight Parameter" error. I did a very small change to overide that errror and give a discriptive error.

The one I used here is the latest version posted here on 2008 Oct 17th.


So this version will have all the options upto today. Such as
 01. Overseas Post
 02. Registered Post
 03. Insurance option

But unfortunately this dont show any images related to the post method. So anyone who expert here can add that to this module. It will be really good if someone add that facility with enable and dissable images using configuration option as well.

Thanks for everyone who contribute to this.

[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: delequah on December 17, 2009, 21:46:36 pm
Thank you all for working on this mod it very helpful for me because I'm in business as well so I like to share with you guy on my mod that been updated I have been using it for some time now, it have all up to date latest version and my mod are:
1. All Auspost Service in front end come with images.
2. Modify the look in back end.
3. Modify the connection on Auspost by using original code from Ben Wilson

you can download at:
http://www.delequah.com/product/download?task=view.download&catid=1&cid=1

I will try to work on it more when I have time

Thank you all again
Title: Re: Australia Post shipping
Post by: Bright Sky on February 11, 2010, 07:31:18 am
This is great the amount of work that has gone into this though I cannot calculate envelope size? for 0.55c anothing below a certian weight 'Australia Post shipping calculator failed, reason: Invalid Weight Parameter'. The product is 0.0005 in weight. If I up the weight to 0.001 the price is $4.35.

How can I geti it to display $0.55?
Title: Re: Australia Post shipping
Post by: markov on March 04, 2010, 01:59:37 am
Hi,
I have tried the last Laurie Lewis zip and have hit a hurdle.
Australia Post has a length limit of 105cm in length and 140cm girth via standard post.
If I exceed these limits when I add a new product - and then try and buy that product - the module accepts it and posts a postage cost. So I need the module to recognise when a length or width limit has been exceeded and to fail gracefully with some kind of warning.

Anyone any ideas?
Title: Re: Australia Post shipping
Post by: delequah on March 12, 2010, 18:38:49 pm
Hello, All
My website is down for maintenance please use this link for time been: http://www.megaupload.com/?d=6BIITC1H
I need to change a lot of thing so I don't know when I can finish it.

Thank you
Title: Re: Australia Post shipping
Post by: delequah on March 13, 2010, 15:17:14 pm
Hello, again
Link above is no good here the new one:
http://www.megaupload.com/?d=L3M94WW9
Title: Re: Australia Post shipping
Post by: Richard on March 16, 2010, 02:50:46 am
Delequah, is that still accessible on your end?

I get this: 'The file you are trying to access is temporarily unavailable'
Title: Re: Australia Post shipping
Post by: Richard on March 16, 2010, 03:28:05 am
sorted, i guess i had to wait my turn :)
Title: Re: Australia Post shipping
Post by: delequah on March 16, 2010, 19:16:31 pm
Hello,
My site is back online
Thank you for waiting
Title: Re: Australia Post shipping
Post by: ghog on March 23, 2010, 13:23:20 pm
I have followed this thread to the end and don't seem to have found a solution for an Aussie shipping module that handles overseas shipping. There must be other shop owners in Oz using VM that wish to trade OS. If anyone has any info on this I would appreciate the tip. :)
Title: Re: Australia Post shipping
Post by: ghog on March 23, 2010, 13:34:26 pm
sorry strike that last comment, i missed page 12, second look i found it, Thanks very much for this contribution.
Title: Re: Australia Post shipping
Post by: ghog on March 24, 2010, 02:16:38 am
I am not sure if this is correct but the module seems to be displaying the wrong shipping amounts. I have a product that is set at 20grams in weight however the shipping cost locally is $14.30 and to send to the US is $72 which seems excessively high. Also if I increase the weight to 1.3kg the cost remains unchanged.
Should I be changing the config anywhere? Any help would be much appreciated.
Title: Re: Australia Post shipping
Post by: Kyliefun on June 05, 2010, 07:54:57 am
I can't get the images to appear, even though they are in the administrator\components\com_virtuemart\classes\shipping\images path (as nominated in the php files.  This is for both the austpost_improve and austpost_oseas modules.
Title: Re: Australia Post shipping
Post by: chezza53 on June 16, 2010, 11:50:14 am
I am a newbie with no php knowledge. I have installed the latest auspost as per this post.
When I go thru to see if all is working I get to the shipping page on my site I get the following messages:

Notice: Undefined variable: shipping_rate_id in /clientdata/zeus-dynamic-1/s/u/superiorrcmodels.com.au/www/joomla_1_5_18/administrator/components/com_virtuemart/classes/shipping/auspost_impove.php  on line 170

Notice: Undefined variable: APtime_std in /clientdata/zeus-dynamic-1/s/u/superiorrcmodels.com.au/www/joomla_1_5_18/administrator/components/com_virtuemart/classes/shipping/auspost_impove.php on line 177

Notice: Undefined variable: APtime_exp in /clientdata/zeus-dynamic-1/s/u/superiorrcmodels.com.au/www/joomla_1_5_18/administrator/components/com_virtuemart/classes/shipping/auspost_impove.php on line 257

Can someone please advise how to fix this?

Also where do I get the auspost images?
Title: Re: Australia Post shipping
Post by: marinos on September 11, 2010, 15:53:43 pm
auspost_impove_v1.1.1 found http://www.megaupload.com/?d=L3M94WW9 does not work with virtuemarts currency converter module, any ideas how to make it work.

currently no matter what currency is selected, the postage price stays the same which could cost the seller a lot more than expected.
Title: Re: Australia Post shipping
Post by: thebeardman on September 20, 2010, 08:13:19 am
Hello everyone.
Actually there is a method which handle overseas pricing, the simple australiapost shipping method. There is few options available but I'm going to add some several options as currency conversion, girth calculate, several packages options.
You can find it here: http://bit.ly/cxQ5IP
Let me know if you have any comments or requests. You can also post report on Joomla! Forge.
Have a good day.
Title: Re: Australia Post shipping
Post by: marinos on September 20, 2010, 13:00:17 pm
Great module BUT this one still dose not work with virtuemarts currency converter module either.

I have attached a couple screenshots.

note the shipping price is the same in all currencies and should change.


[attachment cleanup by admin]
Title: Re: Australia Post shipping
Post by: thebeardman on September 20, 2010, 17:51:00 pm
Hi Marino,
You are right. I'm acctually working on a new version which will convert currency. I will keep you informed when it is done. You can also subscribe to my mailing list about Simple Extensions I have done: http://bit.ly/ProMailing_Sub.
Regards.
Title: Re: Australia Post shipping
Post by: psyspi on September 22, 2010, 08:28:54 am
thebeardman,

That sounds great. Can you please let me know when you finish developing the currency fix? I would love to use the aus post module, but I can't really until it works with user selected currencies.

Also, does anyone have a fix for the <= 100 grams thing?

If a customer purchases something lighter than 101 grams, I get the 'Invalid Weight Parameter' error. Does someone know what to change, to make the system skip the calculator if the weight is <= 100 (and just charge handling perhaps)?

Thanks everyone!

Title: Re: Australia Post shipping
Post by: thebeardman on September 22, 2010, 18:32:09 pm
Hi everyone, I just updated the Simple AustraliaPost Shipping method. You can download it here (http://bit.ly/adc4YX).
You will find more informations on the Joomla! Extensions Directory (http://bit.ly/akVr6K) or on the VirtueMart Extensions Directory (http://bit.ly/ddvr7P).
You can post any bug or request on the forge here (http://bit.ly/b0rt1E).
New functionnalities are currency conversion, and multiple parcels option.
@psypi In the Simple AustraliaPost Shipping method, the minimal weight is 1 gram. If you want to put shipping fee for product under 1 gram, you can use the standard module.
Title: Re: Australia Post shipping
Post by: jess116 on October 20, 2010, 06:43:42 am
Thank you!! I have just downloaded this module and seems to be doing great so far  =)
Title: Re: Australia Post shipping
Post by: TRUITY on November 09, 2010, 07:11:59 am
Australia Post shipping calculator failed, reason: Invalid weight parameter

installed updated Aus Post Shipping as per your link, having issues, both with costs displayed and getting this error message.  How do I fix?

many thanks appreciate your guidance
Title: Re: Australia Post shipping
Post by: ecweb on May 19, 2011, 08:23:52 am
Hi,
There is a new issue to consider when it comes to postage to the US.
Apparently all parcels OVER 500g to the US now have a compulsory extra fee of $9 from Nov. 2010.
Can someone help to  update the Auspost module to reflect this extra charge?
See http://auspost.com.au/apps/international-post-guide.html?countryCode=US (http://auspost.com.au/apps/international-post-guide.html?countryCode=US) for further info.
Thanks,
Ec WEB
So this version will have all the options upto today. Such as
 01. Overseas Post
 02. Registered Post
 03. Insurance option

Title: Re: Australia Post shipping
Post by: Dog_Guy on June 07, 2011, 08:47:14 am
Hi everyone, I just updated the Simple AustraliaPost Shipping method. You can download it here (http://bit.ly/adc4YX).
You will find more informations on the Joomla! Extensions Directory (http://bit.ly/akVr6K) or on the VirtueMart Extensions Directory (http://bit.ly/ddvr7P).
You can post any bug or request on the forge here (http://bit.ly/b0rt1E).
New functionnalities are currency conversion, and multiple parcels option.
@psypi In the Simple AustraliaPost Shipping method, the minimal weight is 1 gram. If you want to put shipping fee for product under 1 gram, you can use the standard module.

Hi Beardman,

I have made another auspost request to you in another thread and its mostly about getting the module working and info about the prepak options.

I went to the joomla extension (clicked on your link) and tried to download, though I have recently installed VM and it is 1.1.8 and yours only works with one version number (earlier).

Do you have any updated releases?
Title: Re: Australia Post shipping
Post by: mdart on January 18, 2012, 07:03:35 am
Hi I am new to Virtuemart and have installed the latest version, there seems to be very little updates yet. What i am after is an Australia Post plugin for Virtuemart 2 and Joomla version 1.7
Title: Re: Australia Post shipping
Post by: GJC Web Design on May 04, 2012, 12:43:37 pm
Here's one -

http://www.gjcwebdesign.com/virtuemart-2.0-auspost-australia-shipping-plugin.html (http://www.gjcwebdesign.com/virtuemart-2.0-auspost-australia-shipping-plugin.html)