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...
>
>
>