Shopping Cart Volume not getting generated correct

  • Posts: 33
  • Thank you received: 0
11 years 6 months ago #104428

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

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #104904

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 :).

Attachments:
Last edit: 11 years 6 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

  • Posts: 33
  • Thank you received: 0
11 years 6 months ago #104924

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

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 6 months ago #105241

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 :

$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;
				}
before these lines :
if(isset($rate->shipping_params->shipping_group) && $rate->shipping_params->shipping_group)
				{
					foreach($order->products as $k => $product){

Last edit: 11 years 6 months ago by Mohamed Thelji.

Please Log in or Create an account to join the conversation.

Time to create page: 0.075 seconds
Powered by Kunena Forum