Zen Cart Logo
Forums / Addon Shipping Modules / AustPost Mod. - Delivery Time Lookup 4 Satchels Too

AustPost Mod. - Delivery Time Lookup 4 Satchels Too

Locked

Views: 2,782

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
23 Jun 2008, 9:59 PM
#1
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

AustPost Mod. - Delivery Time Lookup 4 Satchels Too

Just a quick post to shom all you out there a mod i made to the base austpost.php file. As i noticed, standard 'out of the box' it only applies Delivery Time lookup data to parcels, and usues predefined numbers for satchel delivery times... this doesnt make sense as a 3kg satchel isn't going to be delivered any different to a 3kg parcel, and the same could be said for express...

also there isnt a flat delivery time for satchels as opposed to parcels ... they both depend on sender's and reciever's codes ...

so hopefully this gets noticed and integrated into the official release as it seems a very easy and obvious fix...

backup b4 replace, the original is included too, as well as a patch generated by Winmerge,(though it is the first ive made, im not sure if it works, the patch that is...)

you'll also see i removed the difference in delivery time for REG, COD, RPPi, as they too should be delivered no slower...

INSTALL:

the austpost.php goes in the folder \includes\modules\shipping

Hayden Thring
https://www.hthring.com
24/06/08

:D

373,422c373
< if ($dest_country == "AU") {    // only AU
< // Prepaid stachels
<     if ((in_array("500gm Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 4 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method = zen_image($this->icon_pps5, $this->types['PPS5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaid500g + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPS5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< }
< 
< else {
< 
<     if ((in_array("3kg Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons =  MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 4 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_pps3, $this->types['PPS3']) . $bignumber . $days . "</span>" . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaid3k + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPS3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< 	}
<     }
< 
< ////
<     if ((in_array("500gm Express Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 1 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_ppse5, $this->types['PPSE5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaidExp500g + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPSE5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< }
< 
< else {
< 
< // echo "$sweight $girth  $var[2]" ;
< 
<     if ((in_array("3kg Express Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
---
> //hayden
424,437c375
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 1 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_ppse3, $this->types['PPSE3']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaidExp3k + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPSE3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< 	}
<     }
< ////
< 
< }
---
> //hayden
475,477c413,415
< 	$shipping_austpost_rppi_method =  zen_image($this->icon_ins, $this->types['RPPi']) . $bignumber . ($days + 1) . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_rppi_addons;
< 	$shipping_austpost_reg_method =   zen_image($this->icon_reg, $this->types['REG'] ) . $bignumber . ($days + 1) . "</span> " . zen_image($this->icon_del,  MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_reg_addons;
< 	$shipping_austpost_cod_method =   zen_image($this->icon_cod, $this->types['COD'] ) . $bignumber . ($days + 2) . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_cod_addons;
---
> 	$shipping_austpost_rppi_method =  zen_image($this->icon_ins, $this->types['RPPi']) . $bignumber . ($days ) . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_rppi_addons;
> 	$shipping_austpost_reg_method =   zen_image($this->icon_reg, $this->types['REG'] ) . $bignumber . ($days ) . "</span> " . zen_image($this->icon_del,  MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_reg_addons;
> 	$shipping_austpost_cod_method =   zen_image($this->icon_cod, $this->types['COD'] ) . $bignumber . ($days ) . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_cod_addons;
483a422,455
> //hayden
> 
>     if ((in_array("500gm Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method = zen_image($this->icon_pps5, $this->types['PPS5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaid500g + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPS5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> }
> 
> else {
> 
>     if ((in_array("3kg Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons =  MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_pps3, $this->types['PPS3']) . $bignumber . $days . "</span>" . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaid3k + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPS3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> 	}
> 
> 
>     }
> 
> 
501a474,510
> 	
> 	
> 	//hayden
> 	
> 	
> 	////
>     if ((in_array("500gm Express Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_ppse5, $this->types['PPSE5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaidExp500g + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPSE5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> }
> 
> else {
> 
> // echo "$sweight $girth  $var[2]" ;
> 
>     if ((in_array("3kg Express Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_ppse3, $this->types['PPSE3']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaidExp3k + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPSE3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> 	}
>     }
> ///
538a548,553
> 
> 
>  // edited by hayden...
> 
> 
> 
23 Jun 2008, 11:18 PM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

you'll also see i removed the difference in delivery time for REG, COD, RPPi, as they too should be delivered no slower...

In my very extensive experience, REG'd, COD's and insured parcels typically take a day longer to deliver than regular parcels, which is why that offset was added in the first place.

Rgds
Rod

23 Jun 2008, 11:27 PM
#3
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

RodG:

In my very extensive experience, REG'd, COD's and insured parcels typically take a day longer to deliver than regular parcels, which is why that offset was added in the first place.

Rgds
Rod
ok, you're prob right, i will revert that bit, correct my lost and attachment, thankyou.

23 Jun 2008, 11:32 PM
#4
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

i cant seem to edit the original post so here is the new one :

Just a quick post to shom all you out there a mod i made to the base austpost.php file. As i noticed, standard 'out of the box' it only applies Delivery Time lookup data to parcels, and usues predefined numbers for satchel delivery times... this doesnt make sense as a 3kg satchel isn't going to be delivered any different to a 3kg parcel, and the same could be said for express...

also there isnt a flat delivery time for satchels as opposed to parcels ... they both depend on sender's and reciever's codes ...

so hopefully this gets noticed and integrated into the official release as it seems a very easy and obvious fix...

backup b4 replace, the original is included too, as well as a patch generated by Winmerge,(though it is the first ive made, im not sure if it works, the patch that is...)

INSTALL:

the austpost.php goes in the folder \includes\modules\shipping

Hayden Thring
https://www.hthring.com
24/06/08

373,422c373
< if ($dest_country == "AU") {    // only AU
< // Prepaid stachels
<     if ((in_array("500gm Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 4 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method = zen_image($this->icon_pps5, $this->types['PPS5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaid500g + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPS5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< }
< 
< else {
< 
<     if ((in_array("3kg Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons =  MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 4 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_pps3, $this->types['PPS3']) . $bignumber . $days . "</span>" . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaid3k + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPS3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< 	}
<     }
< 
< ////
<     if ((in_array("500gm Express Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
< 
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 1 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_ppse5, $this->types['PPSE5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaidExp500g + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPSE5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< }
< 
< else {
< 
< // echo "$sweight $girth  $var[2]" ;
< 
<     if ((in_array("3kg Express Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
---
> //hayden
424,437c375
< 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
< 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
< 	}
< 
< 	$days = 1 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
< 	$shipping_austpost_method =  zen_image($this->icon_ppse3, $this->types['PPSE3']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
< 	$cost = $costPrePaidExp3k + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
< 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
< 	$methods[] = array( 'id' => "PPSE3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
< 	}
<     }
< ////
< 
< }
---
> //hayden
483a422,455
> //hayden
> 
>     if ((in_array("500gm Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method = zen_image($this->icon_pps5, $this->types['PPS5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaid500g + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPS5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> }
> 
> else {
> 
>     if ((in_array("3kg Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPS_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons =  MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_pps3, $this->types['PPS3']) . $bignumber . $days . "</span>" . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaid3k + MODULE_SHIPPING_AUSTPOST_PPS_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPS3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> 	}
> 
> 
>     }
> 
> 
501a474,510
> 	
> 	
> 	//hayden
> 	
> 	
> 	////
>     if ((in_array("500gm Express Satchels", $this->allowed_methods)) && ( $sweight < 500 ) && ( $girth < 430 ) && ( $var[2] < 320 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_ppse5, $this->types['PPSE5']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaidExp500g + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPSE5", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> }
> 
> else {
> 
> // echo "$sweight $girth  $var[2]" ;
> 
>     if ((in_array("3kg Express Satchels", $this->allowed_methods))  && ( $sweight < 3000 ) && ( $girth < 600 )  && ( $var[2] < 370 )) {
> 
> 	if (MODULE_SHIPPING_AUSTPOST_HIDE_HANDLING !='Yes') { $handling_details = " " . $currencies->format(MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING * $xchange) . " " .MODULE_SHIPPING_AUSTPOST_TEXT_HANDLING ;
> 	$austpost_addons = MODULE_SHIPPING_AUSTPOST_TEXT_INCLUDE . $handling_details . " ";
> 	}
> 
> 	$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;
> 	$shipping_austpost_method =  zen_image($this->icon_ppse3, $this->types['PPSE3']) . $bignumber . $days . "</span> " . zen_image($this->icon_del, MODULE_SHIPPING_AUSTPOST_TEXT_SHIPPINGDAYS) . $austpost_addons;
> 	$cost = $costPrePaidExp3k + MODULE_SHIPPING_AUSTPOST_PPSE_HANDLING ;
> 	$cost = adjust4tax($cost,$this->tax_class, $order) ;
> 	$methods[] = array( 'id' => "PPSE3", 'title' => $shipping_austpost_method, 'cost' => $cost) ;
> 	}
>     }
> ///
538a548,553
> 
> 
>  // edited by hayden...
> 
> 
> 
24 Jun 2008, 2:20 AM
#5
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

it only applies Delivery Time lookup data to parcels, and usues predefined numbers for satchel delivery times... this doesnt make sense

Unless I'm mistaken, it makes a whole lot more sense than what you have done.

hayden:

so hopefully this gets noticed and integrated into the official release as it seems a very easy and obvious fix...

Appearances can be deceiving.

Unless I'm mistaken (please correct me if I am), but the 'core' of your changes revolve around....

hayden:

< $days = 4 + MODULE_SHIPPING_AUSTPOST_DOFFSET ;

$days = $days + MODULE_SHIPPING_AUSTPOST_DOFFSET ;

I cannot seem to find where you are actually initialising the $days variable. How does this work?

Cheers
Rod

24 Jun 2008, 2:37 AM
#6
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

the $days variable comes from austpost lookup data , so my mod utilises that info currently collected and applied to the parcel and letter estimates, but for some reason not to satchels (rather opting for preset values independant of postcode which makes no sense and wastes the lookup data... )

26 Jun 2008, 3:36 PM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

the $days variable comes from austpost lookup data , so my mod utilises that info currently collected and applied to the parcel and letter estimates, but for some reason not to satchels (rather opting for preset values independant of postcode which makes no sense and wastes the lookup data... )

I hate to tell you this Hayden, but if you take a closer look at the code you'll find that the $days variable doesn't come from the lookup data, at least not at the point in the code where you've made your assumption that it does.
I'm actually surprised that it is giving you consistantly valid results at all (although I'm sure there will be an explanation as to why it does appear to do so).

Cheers
Rod.

26 Jun 2008, 8:46 PM
#8
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

RodG:

I hate to tell you this Hayden, but if you take a closer look at the code you'll find that the $days variable doesn't come from the lookup data, at least not at the point in the code where you've made your assumption that it does.
I'm actually surprised that it is giving you consistantly valid results at all (although I'm sure there will be an explanation as to why it does appear to do so).

Cheers
Rod.

if you actually took the time to look a little closer you would see i moved the pre-paid satchel code block into the part of the php script where the $days value still contains the data recieved from the austpost servers ... :frusty:

27 Jun 2008, 7:04 AM
#9
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

if you actually took the time to look a little closer you would see i moved the pre-paid satchel code block into the part of the php script where the $days value still contains the data recieved from the austpost servers ... :frusty:

"Time" is something I don't seem to have a lot of lately.
I don't mean to make you beat your head against the wall. I just get a wee bit concerned when 'strangers' take my 'baby' out for a walk, especially when it has the potential to cause me support issues.

It seems as though its in good hands though :yes:

Cheers
Rod

27 Jun 2008, 8:43 AM
#10
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

It seems as though its in good hands though

i'll take this as an acknowledgement of my improvement .. ?

my 'baby'

i was under the impression you'd just modded some else's proj,thus the 'improved' suffix ...

out for a walk

welcome to open source :)

i will agree on the time issue, though one has to not let themselves become to much a victim to anothers constructs ;p

27 Jun 2008, 9:24 AM
#11
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

i'll take this as an acknowledgement of my improvement .. ?

Sure. You seem to have all the bases covered :-)

hayden:

i was under the impression you'd just modded some else's proj,thus the 'improved' suffix ...

The original basis (ie, how the modules interface the zen-cart core code) was derived from Gerard Serna's port of a module from another cart. Other than that, it is *99% my own code (with a number of relatively minor tweaks and changes either implemented by, or suggested by other users.

*I say that with a certain degree of embarassment, some of my code is pretty revolting (to say the least).

Cheers
Rod.

27 Jun 2008, 9:35 AM
#12
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

Sure. You seem to have all the bases covered :-)

in that case i look forward to seeing the mod in your next release ;p

27 Jun 2008, 11:48 AM
#13
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

hayden:

in that case i look forward to seeing the mod in your next release ;p

It'd be rude, pointless, and even foolish of me to say no.

Cheers
Rod

27 Jun 2008, 11:53 AM
#14
hayden avatar

hayden

New Zenner

Join Date:
May 2008
Location:
South Australia
Posts:
86
Plugin Contributions:
1

Re: AustPost Mod. - Delivery Time Lookup 4 Satchels Too

thankyou, im glad to be of assistance. And also let me thankyou for your work on a very handy module for top notch cms.