Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Shipping not calculated correctly, it's just using the first rate on the table

Shipping not calculated correctly, it's just using the first rate on the table

Locked

Views: 1,958

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
27 May 2009, 7:57 AM
#1
biophase avatar

biophase

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Shipping not calculated correctly, it's just using the first rate on the table

Hi Guys, I hope you can help me. I have a modified zen cart checkout page. I can't get a hold of my developer so I'm hoping someone can just point me to the correct files or folders to look at.

My shipping is set up with tables:
US - price based
Europe - weight based
Australia - weight based
Canada - weight based
Other - weight based

The US shipping module works fine.

The other modules which are weight based always use the very first rate. My Canada shipping table is this:
7:38,10:42,16:45,20:48,25:52,30:70 (+$0.99 handling)
It charges $28 shipping no matter what the weight is.

Now, I have a shipping cost estimator located on the shopping cart screen. This calculator works perfectly. The calculator displays the correct shopping cart weight and the correct shipping price.

However, once I go to checkout, the shipping costs revert back to the first rate.

If anyone would like to recreate the issue, just go to ghillie suit warehouse, add 2-3 items into the cart. click on the estimate shipping button (you should see a weight) and choose Canada and a province and a fake zip code. Click update and you should see a shipping cost matching the table above.

Then click Proceed to Checkout. At the checkout, change the country to canada, put in a fake 6 character zip code, click on Estimate Shipping and you'll see the shipping cost at checkout.

It will be $38.99 no matter how much weight you put into the shopping cart.

I feel like there is a simple fix to this issue, but I don't know where to begin. I don't think its in the shipping modules, I'm guessing its on the checkout page code?

27 May 2009, 8:04 AM
#2
biophase avatar

biophase

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: Shipping not calculated correctly, it's just using the first rate on the table

After thinking about it, could it possibly be that all my modules are coded wrong? I'm thinking since the shipping by price works and shipping by weight doesn't, that maybe it's the table.php module code?

Here is the code that may be relevant:

// shipping adjustment
switch (MODULE_SHIPPING_TABLE_MODE) {
  case ('price'):
    $order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
    break;
  case ('weight'):
    $order_total = $shipping_weight;
    break;
  case ('item'):
    $order_total = $total_count - $_SESSION['cart']->free_shipping_items();
    break;
}

if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
$shipping = $shipping * $shipping_num_boxes;
// show boxes if weight
switch (SHIPPING_BOX_WEIGHT_DISPLAY) {
case (0):
$show_box_weight = '';
break;
case (1):
$show_box_weight = ' (' . $shipping_num_boxes . ' ' . TEXT_SHIPPING_BOXES . ')';
break;
case (2):
$show_box_weight = ' (' . number_format($shipping_weight * $shipping_num_boxes,2) . TEXT_SHIPPING_WEIGHT . ')';
break;
default:
$show_box_weight = ' (' . $shipping_num_boxes . ' x ' . number_format($shipping_weight,2) . TEXT_SHIPPING_WEIGHT . ')';
break;
}

27 May 2009, 8:23 AM
#3
biophase avatar

biophase

New Zenner

Join Date:
May 2009
Posts:
3
Plugin Contributions:
0

Re: Shipping not calculated correctly, it's just using the first rate on the table

Ok, I'm just talking to myself now. But after thinking more, what I wrote in my 2nd post doesn't make sense. The modules are working fine because my shopping cart shipping estimator works.

So it's back to looking at the checkout page. Now shipping calcs work in price mode but not in weight mode. Doesn't a checkout page normally just call a module and the module should decide it its price or weight based?

30 May 2009, 8:51 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping not calculated correctly, it's just using the first rate on the table

Check your Shipping/Packaging ... what do you have set for the Maximum Weight and the Tare settings?

20 Jun 2009, 5:07 PM
#5
ruyanman avatar

ruyanman

New Zenner

Join Date:
Jun 2009
Posts:
6
Plugin Contributions:
0

Re: Shipping not calculated correctly, it's just using the first rate on the table

Hi,

I too am having what I think is a similar problem.

I have the most current Zen and my site is RuyanMan.com

I'm a newbie to zen but I installed it and everything is running ok.

I have liquid and solid products that can't be shipped together.

When a customer orders the liquid its $17.50 for the first 500 grams and $5.50 for every other 500 grams of product.

When a customer orders solid goods its $15.50 for the first 500 grams and $4.50 for every other 500 grams of product.

Many of my products are in the .01 -.02 lbs etc range but someone can order 10 of that product and it will be .1 - .2 lbs. If they order 100 it will be 1 -2 lbs.

How can I set up the shipping to work for me with what I discussed here?
I tried 6 ways from Sunday and I cannot make it happen. It's as though the table rate doesn't register in the .01 range, nothing works right. I tried a flat rate of 17.50 which is ok for a solid product as the base 500 grams, but, what if they order a liquid? I need 17.50+15.50. I run into problems trying 01:5.50,100:5.50 for instance in the table rate as well. I need $5.50 for every 500 grams sold thereafter.

Please help, it's the last thing I need to do to be online.

Thanks,

RuyanMan

21 Jun 2009, 3:44 PM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Shipping not calculated correctly, it's just using the first rate on the table

On the products, are you using grams or pounds on the weight ...

As to the two rates, you will need to customize a module to determine what products are being used ...

What distinguishes the liquid products from the solid products?