eikeldesign Posted February 19, 2006 Posted February 19, 2006 (edited) I'm using the Table shipping based on number of items v1.0 by Christian Lescuyer and Thomas Piskol to calculate shipping based on the items in the cart. The calculation is as follows: 1 item $5.00 2 items $ 8.00 3 items $11.00 4 items $14.00 There's no additional shipping for more than 5 items. Theoretically, a cart with two items would have an $8.00 shipping charge. However when I use the described module the cart shows a shipping price for 3 items. Even an empty cart incurs a $5.00 shipping charge. What am I doing wrong? Thanks in advance, eikeldesign :huh: Edited February 19, 2006 by eikeldesign Quote
Guest Posted February 19, 2006 Posted February 19, 2006 what's the string you have for the rates? is it like 1:5.00,2:8.00,3:11.00,4:14.00 Quote
eikeldesign Posted February 19, 2006 Author Posted February 19, 2006 (edited) Yes, it is. There was nothing in the description of the module telling me how to define the cost/ item, so I based it on the weight/item value/item options. what's the string you have for the rates? is it like 1:5.00,2:8.00,3:11.00,4:14.00 Edited February 19, 2006 by eikeldesign Quote
Guest Posted February 19, 2006 Posted February 19, 2006 yes, the code does not get into account the exact count. It has this code: for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total <= $table_cost[$i]) { $shipping = $table_cost[$i+1]; break; } } Change it to this in the table.php file for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total == $table_cost[$i]) { $shipping = $table_cost[$i+1]; break; } } if( $i== $size ) { $shipping = $table_cost[$i-1]; } try to see if its any better. Backup your file first. 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.