- Posts: 33
- Thank you received: 0
Shopping Cart Volume not getting generated correct
- crowcreekc
-
Topic Author
- Offline
Less
More
13 years 4 months ago #104428
by crowcreekc
Shopping Cart Volume not getting generated correct was created by crowcreekc
Found and issue with shipping calculations.
1. I have and item that is 50 X 33 X 18 cm. Fine by Australia Post, but if I order 3 of the same items and group together it should give the error that it exceeds the max volume allowed by the selected Shipping Method. As you should send the 33 x (18 * 3), but instead you send 33 x 18 calculating the incorrect volume and providing in accurate shipping quotes. In the example above, if we sent to North Queensland it would cost us $40 in shipping.
2. So then I said not to group products so it would force 1 item per box, it does this correctly but does not add the additional charge for each box. Our additional charge include the cost of Registration and Tracking, so needs to be added for each box not just the first one.
Hopefully I am doing something wrong, but I have tried every combination and so far these results are consistent.
Richard
1. I have and item that is 50 X 33 X 18 cm. Fine by Australia Post, but if I order 3 of the same items and group together it should give the error that it exceeds the max volume allowed by the selected Shipping Method. As you should send the 33 x (18 * 3), but instead you send 33 x 18 calculating the incorrect volume and providing in accurate shipping quotes. In the example above, if we sent to North Queensland it would cost us $40 in shipping.
2. So then I said not to group products so it would force 1 item per box, it does this correctly but does not add the additional charge for each box. Our additional charge include the cost of Registration and Tracking, so needs to be added for each box not just the first one.
Hopefully I am doing something wrong, but I have tried every combination and so far these results are consistent.
Richard
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 4 months ago - 13 years 4 months ago #104904
by Mohamed Thelji
Replied by Mohamed Thelji on topic Shopping Cart Volume not getting generated correct
Hi Richard,
1. I've done some tests and 3 package will be sent to Australia post, the "Group Package" option will just allow you to group your package if they aren't exceeding the Australia Post limits (105x35x35 cm), else the "Group Package" option will be disabled and you'll send your products trough different packages.
In you case You'll send 3 different packages:
2. The "Additional fee" option of your shipping method is a fee that will be added to every Australia Post available service fee, so it will be added just one time for each Australia Post service. However, we are currently working on a "multi shipping" feature that will allow you to use the "price per product" option for every shipping method.
Hope this will help you a little
.
1. I've done some tests and 3 package will be sent to Australia post, the "Group Package" option will just allow you to group your package if they aren't exceeding the Australia Post limits (105x35x35 cm), else the "Group Package" option will be disabled and you'll send your products trough different packages.
In you case You'll send 3 different packages:
2. The "Additional fee" option of your shipping method is a fee that will be added to every Australia Post available service fee, so it will be added just one time for each Australia Post service. However, we are currently working on a "multi shipping" feature that will allow you to use the "price per product" option for every shipping method.
Hope this will help you a little
Last edit: 13 years 4 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
- crowcreekc
-
Topic Author
- Offline
Less
More
- Posts: 33
- Thank you received: 0
13 years 4 months ago #104924
by crowcreekc
Replied by crowcreekc on topic Shopping Cart Volume not getting generated correct
Thank you for this, but the problem is when you state No to Group Package. If you do this, it will create one shipping price even though the 3 items exceed the Australia Post Limits. I would like it to flag this so we can use a different shipping method. The reason we do not use the Group Package option is because of item 2, were the additional fee is only applied to the first package.
Richard
Richard
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 4 months ago - 13 years 4 months ago #105241
by Mohamed Thelji
Replied by Mohamed Thelji on topic Shopping Cart Volume not getting generated correct
As I said, in your case you'll have to send 3 packages to Australia Post and the fee will be the same regarding the state of your "Group package" option.
But if you want to restrict the use of your Australia post shipping method just for when you'll have to send 1 package, the solution would be to edit the code of your Australia Post shipping plugin and to add this code :
before these lines :
But if you want to restrict the use of your Australia post shipping method just for when you'll have to send 1 package, the solution would be to edit the code of your Australia Post shipping plugin and to add this code :
Code:
$order_weight = 0;
$order_volume = 0;
$order_width = 0;
$order_height = 0;
$order_length = 0;
foreach($order->products as $k => $product){
if(!empty($product->cart_product_quantity) && !empty($product->product_weight)){
if(!isset($product->product_weight_unit_orig))
{
if(isset($product->product_weight_orig))
$order_weight+=(int)$weightClass->convert($product->product_weight_orig,$product->product_weight_unit,'g') * $product->cart_product_quantity;
else
$order_weight+=(int)$weightClass->convert($product->product_weight,'','g') * $product->cart_product_quantity;
if(!isset($product->product_dimension_unit))$product->product_dimension_unit = 'm';
$order_volume+=(int)$volumeClass->convert($product->product_length*$product->product_width*$product->product_height,$product->product_dimension_unit,'mm')* $product->cart_product_quantity;
$order_width+=(int)$volumeClass->convert($product->product_width,$product->product_dimension_unit,'mm','dimension')* $product->cart_product_quantity;
$order_height+=(int)$volumeClass->convert($product->product_height,$product->product_dimension_unit,'mm','dimension')* $product->cart_product_quantity;
$order_length+=(int)$volumeClass->convert($product->product_length,$product->product_dimension_unit,'mm','dimension')* $product->cart_product_quantity;
}
else
{
if(!isset($product->product_dimension_unit_orig)){
$product->product_dimension_unit_orig = $product->product_dimension_unit;
}
if(isset($product->product_weight_orig))
$order_weight+=(int)$weightClass->convert($product->product_weight_orig,$product->product_weight_unit_orig,'g')* $product->cart_product_quantity;
else
$order_weight+=(int)$weightClass->convert($product->product_weight,$product->product_weight_unit,'g')* $product->cart_product_quantity;
$order_volume+=(int)$volumeClass->convert($product->product_length*$product->product_width*$product->product_height,$product->product_dimension_unit_orig,'mm')* $product->cart_product_quantity;
$order_width+=(int)$volumeClass->convert($product->product_width,$product->product_dimension_unit_orig,'mm','dimension')* $product->cart_product_quantity;
$order_height+=(int)$volumeClass->convert($product->product_height,$product->product_dimension_unit_orig,'mm','dimension')* $product->cart_product_quantity;
$order_length+=(int)$volumeClass->convert($product->product_length,$product->product_dimension_unit_orig,'mm','dimension')* $product->cart_product_quantity;
}
}
}
if($order_length > 1050 || $order_width > 350 || $order_height > 350 ){
return false;
}
Code:
if(isset($rate->shipping_params->shipping_group) && $rate->shipping_params->shipping_group)
{
foreach($order->products as $k => $product){
Last edit: 13 years 4 months ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
Time to create page: 0.199 seconds