Post by SuperJuice » Thu Jun 23, 2011 8:13 pm

gazerooni wrote:Thanks so much for making the changes SuperJuice. Unfortunately my carts are running 1.4.9.x still. I installed your new module and obviously the admin site structure has changed too much as I am just getting an error:

Fatal error: Call to a member function link() on a non-object in /........./admin/controller/shipping/auspost.php on line 85

So I couldn't test your module. I'll have to make up a new test cart on version 1.5 before I can test it sorry.
Yeah I can't really help the changes made to Opencart sorry.

If you just want to resolve the Satchel pricing issue, you can copy the satchel function block over from the new 1.5.0.5 module to the old, this will also copy over the new pricing structure. It's about 15 lines at the very end of the module, just paste it over the same section in the old module.

If there is enough demand I can release a 1.4.9x version with the Satchel fix.

-edit-

If you're not confident modifying the code let me know and I can throw together another release with the updated pricing + satchel fix for 1.4.9.x, will just need to be this weekend when I have a spare minute :)
Last edited by SuperJuice on Thu Jun 23, 2011 8:19 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by gazerooni » Thu Jun 23, 2011 8:18 pm

Thanks SuperJuice, just confirming its the auspost.php in .../catalog/model/shipping/ ?

Newbie

Posts

Joined
Tue Jun 14, 2011 7:31 pm

Post by SuperJuice » Thu Jun 23, 2011 8:23 pm

gazerooni wrote:Thanks SuperJuice, just confirming its the auspost.php in .../catalog/model/shipping/ ?
Yep, just change this:

Code: Select all

	private function getAuspostSatchel($service, $weight) {
		//Define the different satchel sizes / prices (0 represents unavailable) 
		$satchel = array("satchreg" => array(0 => 6.00, 1 => 10.30, 2 => 0),
		 	 	 "satchexp" => array(0 => 8.40, 1 => 11.70, 2 => 19.10),
 	         	 	 "satchpla" => array(0 => 12.30, 1 => 16.30, 2 => 0));

		//Default to return 0
		$satch_quote = 0;

		if($weight <= 500) { $satch_quote = $satchel[$service][0];}
		if(($weight > 500) && ($weight <= 3000)) { $satch_quote = $satchel[$service][1];}
		if(($weight > 3000) && ($weight <=5000)) { $satch_quote = $satchel[$service][2];}

                if (floatval($this->config->get('auspost_handling')) > 0) {
                	$satch_quote = sprintf('%.2f', $satch_quote + floatval($this->config->get('auspost_handling')));
                }

		if ($this->config->get('auspost_stripgst')) {$satch_quote = (($satch_quote / 11) * 10);}

		return $satch_quote;
	}
To this (the fix is fairly obvious, I just check to see that the satchel quote doesn't equal 0, but this way you also get the updated pricing!)

Code: Select all

	private function getAuspostSatchel($service, $weight) {
		//Define the different satchel sizes / prices (0 represents unavailable) 
		$satchel = array("satchreg" => array(0 => 6.30, 1 => 10.70, 2 => 0),
		 	 	 "satchexp" => array(0 => 8.80, 1 => 12.00, 2 => 19.90),
 	         	 	 "satchpla" => array(0 => 12.80, 1 => 16.90, 2 => 0));

		//Default to return 0
		$satch_quote = 0;

		if($weight <= 500) { $satch_quote = $satchel[$service][0];}
		if(($weight > 500) && ($weight <= 3000)) { $satch_quote = $satchel[$service][1];}
		if(($weight > 3000) && ($weight <=5000)) { $satch_quote = $satchel[$service][2];}

		//Added > 0 check to ensure handling wasn't added if no satchel was suitable
                if ((floatval($this->config->get('auspost_handling')) > 0) && $satch_quote > 0 ) {
                	$satch_quote = sprintf('%.2f', $satch_quote + floatval($this->config->get('auspost_handling')));
                }

		if ($this->config->get('auspost_stripgst')) {$satch_quote = (($satch_quote / 11) * 10);}

		return $satch_quote;
	}
I will likely release this as 1491u3, just need to power up my dev box to repackage it ;)

I have also had 2 reports that 1505 version is working correctly so I have added it to the Extensions page. If anyone is having problems with the 1505 version let me know!

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by gazerooni » Thu Jun 23, 2011 8:30 pm

Thanks SuperJuice, just copied the code and tested in 4.9.1 - it works perfectly.

Thank you again!!

Newbie

Posts

Joined
Tue Jun 14, 2011 7:31 pm

Post by SuperJuice » Thu Jun 23, 2011 8:34 pm

gazerooni wrote:Thanks SuperJuice, just copied the code and tested in 4.9.1 - it works perfectly.

Thank you again!!
No problem,, sorry for the tedium to make it work.

The bug report was much appreciated as I could reproduce the issue immediately. 8)

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by jtsroberts » Tue Jun 28, 2011 11:53 am

Is there an issue with OC 1.4.9.5 and the Australia Post module v1.4.9.1u2 in regards to weight?

I had my system setup as default weight as kilograms. I then entered a product weighing 2kg. The Australia Post API requires weight in grams hence it was returning the value for a 2gm item, not a 2kg item.

What is the best way to setup the OC system in terms of weight and length classes to work with Australia Post module for accurately returning shipping costs?

New member

Posts

Joined
Wed Nov 11, 2009 4:24 pm

Post by jtsroberts » Tue Jun 28, 2011 12:00 pm

The issue with entering products in grams comes when entering the grams in the product listing. For example, we have a product that weighs 14kg so we enter 14000 into the field for weight. What's stored in the DB is 999.99 - which sends a weight of 1kg to the auspost API.

New member

Posts

Joined
Wed Nov 11, 2009 4:24 pm

Post by bronco92 » Wed Jun 29, 2011 9:48 am

As of this morning, all of our previously working installs of the Aus Post module are returning this error:

Error interfacing with Australia Post (connection)

We have not touched any code, and as mentioned, they were all previously working.

Has anyone experienced this today?

UPDATE: Seems to have fixed itself, must have been an error on Aus Posts side.

We develop opencart shopping cart website systems for $750/year.


Newbie

Posts

Joined
Tue Aug 17, 2010 12:57 pm
Location - Brisbane

Post by bronco92 » Fri Jul 01, 2011 7:40 am

I enquired about the outage with Auspost. Auspost is releasing a new DRC on Monday morning (July 4) that is currrently incompatible with the existing estensions for both Opencart and osCommerce. I've been talking directly with an IT Manager at Auspost about this.

If you'd like to join in the conversation or find out more info, please PM me.

We develop opencart shopping cart website systems for $750/year.


Newbie

Posts

Joined
Tue Aug 17, 2010 12:57 pm
Location - Brisbane

Post by SuperJuice » Sat Jul 02, 2011 1:33 am

bronco92, I would definitely like to know about it.

If you can provide any details to me it would be appreciated.

I would expect that they would have an alternate DRC running somewhere using the new method if it isn't backwards compatible. (for testing)

jtsroberts, can't confirm if it works on 1.4.9.5, but the module uses the Opencart conversion API to convert whatever weights you have set into grams for the calculation, I can only think that there may be an issue with how your weights are setup?

Nothing has changed in the weight calculation code since very early versions of the module.

Have you managed to resolve the issue?

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by SuperJuice » Sat Jul 02, 2011 2:13 am

I have confirmed a bug that was raised under the 'Extension' feedback section by user stylevo (Thanks!).

The issue is that if you only select satchels (ie. not traditional postage methods) that satchels will not appear as a postage option.

I have found the problem (was due to my haste to get satchels added) and I will be releasing an updated version to resolve this (1.5.0.5u1). This is currently the only change and will only affect people who want to use only satchels as their postage method (others don't need to upgrade).

I am waiting on feedback about the DRC updates as I would like to be able to test these over the weekend if they are as dramatic as bronco92 has mentioned!

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by bronco92 » Sat Jul 02, 2011 9:48 am

SuperJuice wrote:bronco92, I would definitely like to know about it.

If you can provide any details to me it would be appreciated.

I would expect that they would have an alternate DRC running somewhere using the new method if it isn't backwards compatible. (for testing)
I spoke with the Aus Post IT manager on Friday. Auspost are delaying the release of the new DRC until all issues are ironed out. Support for both new and legacy installs of the Auspost extension in both Opencart and osCommerce will be a priority. The IT manager will be keeping me up to date via email. Apparently the new DRC will have plenty of new options too.

SuperJuice, send me an email to matt (at) mywork.com.au and I'll bring you in on the conversation with the IT manager.

We develop opencart shopping cart website systems for $750/year.


Newbie

Posts

Joined
Tue Aug 17, 2010 12:57 pm
Location - Brisbane

Post by SuperJuice » Sat Jul 02, 2011 9:52 am

Support for both new and legacy installs of the Auspost extension in both Opencart and osCommerce will be a priority.
Not sure how that works when I write the OpenCart module? happy to reconfigure the module once I have details.

Have emailed you.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by Damonik » Sat Jul 02, 2011 10:12 am

Hi there,
I've installed this extension on Opencart 1.4.9.5 but everytime I go to checkout and ship - I'm directed to index.php?route=checkout/shipping which comes up as a blank page.

If I disable the Australia Post extension, the page will come up as expected.

Hoping anyone has some advice on what to do?

Cheers!

Newbie

Posts

Joined
Sat Jul 02, 2011 10:10 am

Post by SuperJuice » Sat Jul 02, 2011 10:21 am

Damonik wrote:Hi there,
I've installed this extension on Opencart 1.4.9.5 but everytime I go to checkout and ship - I'm directed to index.php?route=checkout/shipping which comes up as a blank page.

If I disable the Australia Post extension, the page will come up as expected.

Hoping anyone has some advice on what to do?

Cheers!
I haven't done testing on 1.4.9.5 (it's difficult to keep up to date with all the varying versions of OpenCart).

Can you confirm that the version of the module you installed was opencart1491u2.auspost.zip?

If there are problems though I will take a look. Is there a reason you aren't using the 1.5.0.5 version of OpenCart?

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by Damonik » Sat Jul 02, 2011 10:28 am

Hey mate,
Yeah I'm using opencart1491u2.auspost

We're avoiding moving to 1.5.0.5 until it has been out in the 'wild' a bit longer.

Newbie

Posts

Joined
Sat Jul 02, 2011 10:10 am

Post by SuperJuice » Sat Jul 02, 2011 6:11 pm

Have just released 1.5.0.5u1 to the Extensions section.

Changelog:
----------
1.5.0.5u1
- Fixed bug that resulted in Australia Post module not being displayed if prepaid satchels were the only postage method selected (reported by stylevo on opencart.com)

http://www.opencart.com/index.php?route ... on_id=1011
Last edited by SuperJuice on Sat Jul 02, 2011 7:28 pm, edited 1 time in total.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by SuperJuice » Sat Jul 02, 2011 7:27 pm

Also just released 1.4.9.1u3 to the Extensions section (grab it and let me know how you go gazerooni!).

Changelog
----------
1.4.9.1u3
- Fixed bug that resulted in satchels being incorrectly displayed if parcel was overweight and handling fee was added (reported by gazerooni on opencart.com)
- Updated Australia Post satchel pricing to match the new Australia Post pricing schedule
- Fixed bug that resulted in Australia Post module not being displayed if prepaid satchels were the only postage method selected (reported by stylevo on opencart.com)

http://www.opencart.com/index.php?route ... on_id=1011

Thanks to those who contributed bug reports.

Still haven't had a chance to look at 1.4.9.5 sorry!

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by SuperJuice » Sat Jul 02, 2011 8:58 pm

Damonik wrote:Hey mate,
Yeah I'm using opencart1491u2.auspost

We're avoiding moving to 1.5.0.5 until it has been out in the 'wild' a bit longer.
Understand, no problem.

I have just done a completely fresh install of 1.4.9.5 onto my dev instance and installed the 1.4.9.1u3 release and there are no issues I can see with the postage module.

I can calculate shipping, use satchels, checkout orders the entire way through etc. etc. etc.

There haven't been any major changes in u3 that I would expect to 'fix' the problems you have described, but can you download u3 and test it on your 1.4.9.5 install? as I am keen to replicate the issues.

The only changes I make to the configuration after installing is adding Australian Dollar (AUD) Currency to the store and I then make that currency the default in localisation settings with a value of 1.0.

I then just copy the Australia Post u3 files into place, install the module, set a source postcode and enable Standard/Express and Standard/Express satchels.

I have tested changing the destination postcode / location and the prices adjust accordingly.

I am running PHP Version 5.3.2 on my test instance, can you let me know what PHP version you are on?

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm

Post by SuperJuice » Sun Jul 03, 2011 9:35 am

Damonik , Had another look this morning and your issue is likely that you don't have curl installed/configured for PHP. This module currently uses curl to fetch the details from Australia Post.

My guess is that when you have the module loaded PHP is throwing an error that the curl function doesn't exist, that is why you are getting the behaviour you see.

Take a look at your PHP error log and also confirm that the curl extensions are enabled in your PHP installation and let me know.

Active Member

Posts

Joined
Thu Aug 13, 2009 12:06 pm
Who is online

Users browsing this forum: No registered users and 6 guests