Guest Posted December 18, 2004 Posted December 18, 2004 Okay here a good one! I sell cut opal stones in my store and the weight I use to weigh them is grams. I use the Auspost contribution to calculate shipping, to use this addon 1. everything has to be done in kgs 2. max shipping weight has to be set at "20" (kg) in admin - configuration - shipping/packaging 3. Tare weight must be set at 0 4. Large package must be 0 So in order to use it I MUST use correct weights. Most of my stones weigh around 0.2 grams which equates to 0.0002 kg Now if you add a stone to the cart which weighs 0.0002kg the Auspost shipping calculater gives an error. The only way I can get Auspost to calculate is to use a weight with less than 2 decimal places before a non zero number (i.e. 0.002 kg) This is okay because my packaging weighs 10 grams, so the customer doesnt get ripped off with shipping costs. I would just like to know if anyone has any ideas why it does this? I use Creloaded 6.1a Shane Quote
customc Posted December 22, 2004 Posted December 22, 2004 I am also facing the same situation. My craft stamps weigh around 10 to 100 grams. One way around it is to charge a flat rate, but that's no good is you have a customer who wants insurance. The only thing I can think of is to email someone how writes the auspost contribution and see if they are willing to fix the problem. Other thoughts??> Quote
Guest Posted December 22, 2004 Posted December 22, 2004 (edited) I am also facing the same situation. My craft stamps weigh around 10 to 100 grams. One way around it is to charge a flat rate, but that's no good is you have a customer who wants insurance. The only thing I can think of is to email someone how writes the auspost contribution and see if they are willing to fix the problem. Other thoughts??> <{POST_SNAPBACK}> Tried that but got no response Shane Edited December 22, 2004 by Shanet Quote
customc Posted December 22, 2004 Posted December 22, 2004 Talked to someone who knows the bloke who wrote the module. Nothing is going to be touched until after the new version of oscommerce is released. And when the release date is, they haven't decided yet. Are there any other modules for other countries that do allow an extra zero? If so, can they be modified? I guess the answer is no.... d.i.y. Quote
Jan Zonjee Posted December 22, 2004 Posted December 22, 2004 If a minimum weight is a problem, can't you code for that? For example in auspostair.php in the function quote the weight that is posted to http://drc.edeliver.com.au/ratecalc.asp is: $sweight = $shipping_weight*1000; Say the minimum weight is 1 gram I think something like this could work: $sweight = ($shipping_weight < 0.001)?1:$shipping_weight*1000; meaning: $sweight = (expression)?returned_if_expression=true:returned_if_expression_is_false; Quote
Guest Posted December 24, 2004 Posted December 24, 2004 If a minimum weight is a problem, can't you code for that? For example in auspostair.php in the function quote the weight that is posted to http://drc.edeliver.com.au/ratecalc.asp is: $sweight = $shipping_weight*1000; Say the minimum weight is 1 gram I think something like this could work: $sweight = ($shipping_weight < 0.001)?1:$shipping_weight*1000; meaning: $sweight = (expression)?returned_if_expression=true:returned_if_expression_is_false; <{POST_SNAPBACK}> I tried mucking around with that line of code (but not like you have) and all I got was a wrong shipping price. As I understand it the (*1000) part is telling Auspost that the weight is in kg. Ill have a go with your code on my test site and see what happens Shane Quote
Jan Zonjee Posted December 24, 2004 Posted December 24, 2004 As I understand it the (*1000) part is telling Auspost that the weight is in kgActually, I think it is taking the value you have in kg and converting that in gram for Auspost. Perhaps Auspost doesn't like any decimals in the grams and you need to add as a second line: $sweight = round($sweight, 0); // round to the nearest integer value Good luck anyway. Quote
Guest Posted December 24, 2004 Posted December 24, 2004 Actually, I think it is taking the value you have in kg and converting that in gram for Auspost. Perhaps Auspost doesn't like any decimals in the grams and you need to add as a second line: $sweight = round($sweight, 0); // round to the nearest integer value Good luck anyway. <{POST_SNAPBACK}> Hey that sounds good to me! What I know about php you could write on a postage stamp! Its all a learnig curve for me please keep the suggestions coming. I'll try using both lines and see what happens. (when I get the time, I work a 14hr day at a mine site) Shane Quote
Guest Posted December 25, 2004 Posted December 25, 2004 JanZ Let me shower you in kisses! I added both lines and it works perfectly! Thanks a lot for all your help Shane Quote
phear Posted January 18, 2005 Posted January 18, 2005 its not working for me. I change the following and it works fine $shipping_auspost_cost = (($charge/1.1)* $shipping_num_boxes); to $shipping_auspost_cost = ($charge/1.1); Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.