Jump to content
auzStar

[Contribution] NEW Australia Post Shipping Modules for osC 2.3.x

Recommended Posts

hi  @auzStar

 

i installed your addons for a while, and was working ok, but recently all a sudden my clients can not make order, and the error message is same as @mafiouso, which he mentioned about the heigh, i really have no idea which file and what part of the code to check with, can you please help. It doesn't change to the payment page if i change the code of

 array_multisort($quote, SORT_ASC, $quotes); 

to

       if(is_array($quote))
      {
          array_multisort($quote, SORT_ASC, $quotes);
        
      }

 

it still doesn't go to the next process: payment

 

PS I can go to the next payment stage only if i change the shipping address to overseas!

 

thanks!

Edited by ce7

Share this post


Link to post
Share on other sites

@@ce7

 

I need more information to try to troubleshoot/replicate the issue, such as your Auspost Shipping settings, server environment, osC version.

My setup is working fine.

 

Why is it happening with a certain product? If it works with other products then it's probably not a problem with the module. Check the entries for the products causing the issue.

 

You could try just commenting out that bit of code to see it helps (all this code does is sort by price putting cheapest first).

example below (i.e. put double slash // at beginning):

// array_multisort($quote, SORT_ASC, $quotes);

 

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

New version (v1.1) has been added to the add-on:

http://addons.oscommerce.com/info/9150/#tabs-hist

 

-----------------------------------------------------------------------------------------------------------------------
AUSPOST SHIPPING SERVICES INCLUDED IN THIS PACKAGE:
 
*International Parcels (info here - https://auspost.com.au/parcels-mail/sending-overseas/international-delivery-options):
Australia Post - Courier International Post (with and without extra cover) - 2 options
Australia Post - Express International Post (with and without extra cover) - 2 options (Signature on Delivery included on both options)
Australia Post - Standard International Post (with and without extra cover) - 2 options
Australia Post - Economy Air International Post (with and without extra cover) - 2 options
 
*Domestic Parcels (info here - https://auspost.com.au/parcels-mail/sending-in-australia/domestic-parcels):
Australia Post - Parcel Post (with and without extra cover) - 4 options (optional Signature on Delivery)
Australia Post - Express Post (with and without extra cover) - 4 options (optional Signature on Delivery)
Australia Post - Courier Post (with and without extra cover) - 2 options (Signature on Delivery included on both options)

 

------------------------------------------------------------------------------

CHANGES IN THIS VERSION v1.1:
Shipping modules have changed (none of the other modifications made from the previous version have changed).
Inclusion of new gif/image files i.e. AusPost logos.
Changes have been made to enable communication to the new AusPost server to retrieve shipping costs and changes on how the API key's are used for live and test mode, plus some minor wording changes to shipping services.
The International modules have new names (and new filenames) with some slight differences to delivery services but the Domestic modules have the same names and no changes to the delivery services. Please visit AusPost website for further information on International shipping services at the following link: https://auspost.com.au/parcels-mail/sending-overseas/international-delivery-options
The changes to the International and Domestic shipping modules are mainly due to the original AusPost contact server being decommissioned in the new year (2017). The new server came online during 2016 and also introduced new API service codes. Changes are also due to some International services being discontinued with the introduction of more simplified International services.

 

------------------------------------------------------------------------------

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

hi,

 

i am trying to install it on the BS version, it showes up all the shipping option, but the button to go to the next stage is missing.

 

Does it means it is not compatible with the BS version? thanks!

Share this post


Link to post
Share on other sites

@@ce7

hi,

 

i am trying to install it on the BS version, it showes up all the shipping option, but the button to go to the next stage is missing.

 

Does it means it is not compatible with the BS version? thanks!

 

No it's not BS compatible at the moment. It says non-BS in the comments of the download. Always check the history tab for updated comments when you download a package.

 

cheers

 


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

hi,

 

thanks for the prompt reply.

 

I tried to installed it on 2.3.4 version this time, and it show the message,

 

error.gif Shipping is currently not available for the selected shipping address. Please select or create a new shipping address to use with your purchase.

 

i put 2 australia address and enable both australia post local and overseas shipping mode, what does it mean and how should I check, thanks!

Share this post


Link to post
Share on other sites

@@ce7

 

You haven't given me any details to help troubleshoot, osC ver?, Zones setup?, Module Shipping Zones and other settings?, weight settings?, do your products have a weight set? There could be many reasons why you are getting this message.

 

Maybe your Shipping Zones haven't been set correctly and make sure you have set up the state zones for Australia in "Locations/Taxes->Zones".

 

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Are there any plans to update this addon for bootstrap? I can't find any Australia Post addons that are bootstrap compatible and it would be awesome if this one was

Share this post


Link to post
Share on other sites

Yes i would also like to kindly know the answer to this question. A BS version would be much appreciated

Share this post


Link to post
Share on other sites

@@Ozpicious

Are there any plans to update this addon for bootstrap? I can't find any Australia Post addons that are bootstrap compatible and it would be awesome if this one was

 

@@CGhoST

Yes i would also like to kindly know the answer to this question. A BS version would be much appreciated

 

It will eventually be made compatible for BS. I can't say when. At the moment there are too many core changes required which goes against BS policy.

 

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Hi @ auzStar  https://forums.oscommerce.com/profile/290729-auzstar/

 

I managed to install the new australia post addon to the BS version, which show the price with no problem now.

there are 2 questions i like to ask:

1. the price will only show before 14:00 and the maximum cut off is set as 13 or 0.

with the setting, any thing after 2pm will not show the price, is there a way to set the price still showing and can be selected and the delivery will be made the next day?

2. i set it as LIVE, but when i make a test order with paypal express sandbox setting, it keeps asking me "you must specify one shipping option type as the default, even though the first step is to select the option of the delivery from the new australian post addon. (same as normal paypal checkout process). Is this because the addon not design for BS version and causing the problem? Or any other reason and any suggestion that I can fix it?

situation 2.1: choose the cheapest option, it will not go to the paypal sandbox page

situation 2.2: choose the other option, by chance it go to the paypal sandbox page, but the delivery fee is not add on top of the product price

 

thanks!

Lyn

Edited by ce7

Share this post


Link to post
Share on other sites

@ce7

This question has already been answered. It's not compatible with BS version.

cheers

 

 


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites
17 hours ago, auzStar said:

@ce7

This question has already been answered. It's not compatible with BS version.

cheers

Hi auzStar,

 

Thank you for the prompt reply. OK I understand. However regardless the compatibility the setting of the time, like after 2pm and max number as 13, is there a way to change the setting. I did install this addon on 2.3.1 version and facing the same issue. I need to be able to show the Australia post estimate fee all the time even after 2pm and the delivery can be manage to be delivery the next day.  thanks!  Lyn

17 hours ago, auzStar said:

 

 

 

Share this post


Link to post
Share on other sites

@ce7

No, it's not possible to change this setting for the "Australia Post - Courier Post" module. It needs a cutoff time to use this shipping module because the lodgement cutoff time at Australia Post is 2pm for next day Courier Post delivery. So the max setting is 1pm to give you enough time to get the package to Auspost.

"Australia Post - Express Post" and "Australia Post - Parcel Post" shipping modules don't have this setting so they will still appear as a shipping option.

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Hello Dominic @auzStar,

Trying to use the old international shipping modules on a new 2.3.4.1 BS EDGE store latest version, I get the following error:

ERROR: We apologise, we are unable to obtain a valid quote from the Australia Post Server.
If you would like to use this option as your shipping method, please contact us.

The same module works on an old 2.2 store with the same settings and configuration.

The new store runs PHP 7.2 locally and 7.1 on server. I also tried going down until PHP 5.5.

The other domestic modules work fine.

Modules are:

domestic: aprego.php (and others) => works fine

relevant code:

		$header = array("AUTH-KEY:".$APIKEY);

		//$url = "https://auspost.com.au/api/postage/parcel/domestic/calculate.xml?suboption_code=AUS_SERVICE_OPTION_EXTRA_COVER&from_postcode=$frompcode&to_postcode=$topcode&length=10&width=10&height=10&weight=$sweight&service_code=AUS_PARCEL_REGULAR&option_code=AUS_SERVICE_OPTION_REGISTERED_POST&extra_cover=$extra_cover";
$url = "https://auspost.com.au/api/postage/parcel/domestic/calculate.xml?from_postcode=$frompcode&to_postcode=$topcode&length=10&width=10&height=10&weight=$sweight&service_code=AUS_PARCEL_REGULAR&option_code=AUS_SERVICE_OPTION_SIGNATURE_ON_DELIVERY&extra_cover=";
		$auspost_xml = $this->get_auspost_api( $url, $header );

		$xml = simplexml_load_string($auspost_xml);
		
		$charge = (float) $xml->total_cost;

		$apreg_error = $xml->errorMessage;

		$days = '';

Inernational: insuredauspostair.php (and others) => throws above error

relevant code:

            $newtopcode = str_replace(" ", "", $topcode);
            /**
* Initialize the cURL session
*/
$ch = curl_init();
/**
* Set the URL of the page or file to download.
*/
curl_setopt($ch, CURLOPT_URL,
"http://drc.edeliver.com.au/ratecalc.asp?Pickup_Postcode=$frompcode&Destination_Postcode=$newtopcode&Country=$dest_country&Weight=$sweight&Service_Type=AIR&Height=$sheight&Width=$swidth&Length=$slength&Quantity=$shipping_num_boxes");
/**
* Ask cURL to return the contents in a variable
* instead of simply echoing them to the browser.
*/
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/**
* Execute the cURL session
*/
$contents = curl_exec ($ch);
/**
* Close cURL session
*/
curl_close ($ch);
                               $vals = preg_split("/\n/", $contents);
                                foreach ($vals as $value) {

                                                $bits = preg_split("/=/" ,$value);
                                                $$bits[0] = $bits[1];
                                }
      
           if ($charge <= 0) {
            $error = true;
           } else {

 

1. is this a known issue with 2.3.4.1 BS

2. Which auz post modules are recommended to be used with latest 2.3.4BS EDGE

 

Thanks in advance

Rainer

Share this post


Link to post
Share on other sites

One more hint:

In the old store 2.2 if I echo the response array:

                               $vals = preg_split("/\n/", $contents);
                                foreach ($vals as $value) {
    echo '$bits ' . print_r($bits) ;  

                                                $bits = preg_split("/=/" ,$value);
                                                $$bits[0] = $bits[1];
                                }

I get this: $bits 1Array ( [0] => charge [1] => 21.48 ) $bits 1Array ( [0] => days [1] => 0 ) $bits 1

In the new 2.3.4.1 BS store I get:

Array ( [0] => charge [1] => 0 ) $bits 1Array ( [0] => days [1] => 0 ) $bits 1Array ( [0] => err_msg [1] => Please enter a valid Service code. )

Share this post


Link to post
Share on other sites

Hi @raiwa

This shipping contribution was created to run on non-BS versions. I'm pretty sure I worked on this before the BS version started to become mainstream and never got around to creating a BS version. There are a lot of code changes that are required to install this module so it needs a complete rethink to code it up to BS "no core changes" policy. The core changes are mainly to do with the way the shipping quotes are displayed in "checkout shipping" i.e. there are multiple shipping quotes for a given shipping option. And also a lot of the copy/paste replace code is using tables and cells as opposed to divs.

I don't know what could be causing the error you mention with international shipping other than to say that this contribution is in-compatible with the BS version as already mentioned. As far as I know it all works OK on the non-BS versions. At the moment I don't have a lot of time to look at this, but if I get a chance I will. The modules are very complex and I would need to study the code again because it's been a while :). But going by the error " Please enter a valid Service code" suggests that the service codes aren't being sent to the Auspost server correctly. Something do to with the way the data (that is to be sent) is being handled and compiled initially.

cheers

Edited by auzStar

My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Hello Dominic @auzStar,

First of all thank you for your help and answer.

I did several research and testing. Please note that I'm all the time referring to the old modules, not the new modules which require a lot of core file changes. The old modules I refer to are standard shipping modules which should work just copying the module incl. languge files and installing the module.

Here the package:

https://apps.oscommerce.com/0mp8t&australian-shipping-module

I tried now in standard 2.3.4.1, 2.2rc2a under php 5.4 aand 7.1 and 7.2 with all the same result: err_msg [1] => Please enter a valid Service code.

on the original store installation it works, I compared involved files, setup, configuration, language, currencies etc. I couldn't find any significant difference.

This is present: Your host must have " libcurl/7.14.0 OpenSSL/0.9.8 zlib/1.2.3 " installed on the server

and the working store is under the same php 5.4 local xampp installation like the test store which do not work.

Any clue in which direction to continue?

Thank you

Rainer

Edited by raiwa

Share this post


Link to post
Share on other sites

Hello Dominic @auzStar and other users of the australian shipping modules,

I found the fixes.

Tere were 2 different problems:

1. I missed to fill in the correct settings in admin=> configure=> Shipping/Packaging

The shipping modules need Australia as country of origin and a valid Australia Post Code.

This change made the module correct working under PHP5.5 and 5.6, but under PHP7 the error was still showing up.

2. Under PHP7 the variables assign needed an update:

          $$bits[0] = $bits[1];

needs to be changed to:

          ${$bits[0]} = $bits[1];

Now all works ok

Better a generic error message than a specific error message pointing in the wrong direction :sleep:

I added some other updates for 2.3.4.1 BS and PHP7 and will upload the updated modules soon.

Hope this helps other aust post users

Edited by raiwa

Share this post


Link to post
Share on other sites

found a more stable/better solution:

           foreach ($vals as $value) {
             $bits = preg_split("/=/" ,$value);
             $values[$bits[0]]= $bits[1];
           }
           extract( $values, EXTR_OVERWRITE);  

 

Share this post


Link to post
Share on other sites

Hi Rainer @raiwa

Glad you got it sorted out. Appreciate your efforts as many others would also.

Sorry that I misunderstood that you referred to older modules.

Just to confirm that this applies to other older Australia Post shipping modules, not this contribution since the code above does not exist. But this contribution is still to be tested on PHP7, and not recommended for osC BS version.

cheers


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

Hi,

Great add-on.  I've set this up and works well.  I just have a query about international.  When I install the module for international standard for example I obviously choose the shipping zone.  However i'm provided with just three options (NZ, Australia and the rest of the world).  If I choose NZ it won't how up for customers in the USA.  More importantly if I set it to rest of world customers in NZ don't get a postage option.  I may have missed something, but I can't find how to make the optional applicable to both NZ and rest of world

Cheers

Share this post


Link to post
Share on other sites

Hi  Dominic,

Been using the AUS  POST 1.1 for some time and working very well.  In the last few months though I have been trimming all aspects of the site RAB HOBBIES to speed the page load times to under 1 second and failing miserably. Thinned the images and killed other non-useful add-ons in the hope of faster page load times. 
Customers have kept me informed as to the load times as a reference. 
The issue has been plaguing the site still. In the end, the script for 1.1 had been calling am IP address constantly, slowing the site page load times.  Below is the reply from my Hosting company after they did a test.

"
Hello Rens,

We appreciate you again for answering the call back earlier. Please refer on the details below provided by our Administrators.

In regards to slowness experienced, we have done a trace and it appears to be due to the website calling this address auspost.com.au 52.222.138.160 repeatedly, the website loads much faster without this.

sample logs.
setsockopt(8, SOL_TCP, TCP_NODELAY, [1], 4) = 0
connect(8, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("52.222.138.160")}, 16) = -1 EINPROGRESS (Operation now in progress)
getsockopt(8, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
getpeername(8, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("52.222.138.160")}, [16]) = 0

[30-Apr-2019 10:26:16 Australia/Melbourne] PHP Warning:  simplexml_load_string(): { in /home/rabhobbi/public_html/online/includes/modules/shipping/apdomexp.php on line 278
[30-Apr-2019 10:26:16 Australia/Melbourne] PHP Warning:  simplexml_load_string(): ^ in /home/rabhobbi/public_html/online/includes/modules/shipping/apdomexp.php on line 278

"

As a result, i have removed the AUST POST 1.1 modules used and configured a flat rate option for now.  Since this has been done the load times are less than 0.5 sec on any page.

Your thoughts and feedback is greatly appreciated as id prefer the AUST POST modules as these provide a better and confidence booster to customers buying from us.

Hope to hear from you soon.

Regards,

Ren

R.A.B. Hobbies.

Share this post


Link to post
Share on other sites

@milkman45

I don't know where you're getting that ip 52.222.138.160 from.

When I ping the Australia Post api server "digitalapi.auspost.com.au" (from inside the file apdomexp.php, shown in you log above) I get this ip 54.230.242.74.

"digitalapi.auspost.com.au" is the only connection used by the module to the Australia Post api server to retrieve the postage rates: $api_server = 'https://digitalapi.auspost.com.au'.

If you look at the attached screen images (which are ip lookups) you'll see that 52.222.138.160 points to some server in India.

54.230.242.74 (the correct one) points to the server in Melbourne.

There is also a trace route (the black screen shot) also confirming this.

Check that you haven't been hacked.

 

 

52-222-138-160.jpg

54-230-242-74.jpg

tracert.jpg


My Add-ons
Advanced Cache Control Tool for osCommerce 2.3.x (non-bootstrap) Download Support
Ajax Product Listing for osC 2.3.4 (bootstrap) Download Support
Category New Products Carousel for osC 2.3.4 (bootstrap) Download Support
Category Popular Products Carousel for osC 2.3.4 (bootstrap) Download Support
Customer Testimonials for osCommerce 2.3.4 (bootstrap and non-bootstrap) Download Support
Front Page New Products Carousel for osC 2.3.4 (bootstrap) Download Support

Index Nested - Product Listing for osC 2.3.4 (bootstrapDownload Support
Match Categories in Search Results for osCommerce versions 2.3.x (non-bootstrap) Download Support
Modular Category Page for osC 2.3.4 (bootstrap)
Download Support

NEW Australia Post Shipping Modules for osCommerce 2.3.x (non-bootstrap) Download Support
NEW Equal Height Module for osC 2.3.4 (bootstrapDownload Support
Products Low Stock Report for osC 2.3.x (bootstrap and non-bootstrap) Download Support
Twitter Typeahead Autocomplete Search for osCommerce 2.3.4 (bootstrap and non-bootstrap)
Download Support

Upcoming Products Modules for osC 2.3.4 (bootstrap) Download Support

 
Assisted Add-ons
Scroll Boxes for osCommerce 2.3.x (bootstrap and non-bootstrap) Download Support
 
Bootstrap Add-ons created by other members
osCommerce Bootstrap Addons and Code

Share this post


Link to post
Share on other sites

HI,

Well thats surprising.  The info was supplied to me by my hosting company so it's thrown me. I've been meticulous with hacking and have experienced it once.
The question i have is where do i start to look for any hacking.

This has been a constant issue, the slow uploads and page refreshes while using 1.0 and now 1.1.

Mind you i have not been advised by any customer in the past 4 years of any issues with payments or purchases.

I'll look at the back-end tomorrow and see if there were any changes. Any suggestions where to start.

Regards,

Ren


 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×