- Posts: 191
- Thank you received: 5
Australia Post - Warning: Division by zero
11 years 4 months ago #202771
by lt635
Australia Post - Warning: Division by zero was created by lt635
-- url of the page with the problem -- :
www.littletreasurebox.com.au/website/index.php/collection
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
Hello,
I am having some issues with Australia Post, it gives me the following warning:
Warning: Division by zero in /home/littlet4/public_html/website/plugins/hikashopshipping/aupost/aupost.php on line 33
All products have a weight. I have attached an image of the Australia Post setup and the error on page.
I hope you can help
.
Thank you
Kind regards
Lene
-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
Hello,
I am having some issues with Australia Post, it gives me the following warning:
Warning: Division by zero in /home/littlet4/public_html/website/plugins/hikashopshipping/aupost/aupost.php on line 33
All products have a weight. I have attached an image of the Australia Post setup and the error on page.
I hope you can help
Thank you
Kind regards
Lene
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202814
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Australia Post - Warning: Division by zero
Hi,
Thanks for the report ; this issue has already been fixed in HikaShop and will be include in the next HikaShop release.
All your products have a weight but it looks like that some does not have dimensions.
Regards,
Thanks for the report ; this issue has already been fixed in HikaShop and will be include in the next HikaShop release.
All your products have a weight but it looks like that some does not have dimensions.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202873
by lt635
Replied by lt635 on topic Australia Post - Warning: Division by zero
Hi Jerome,
OK, is this easy to import by just adding product code and dimension? I really do not want to stuff up the product listings now. I know we can setup manual postage, I will check with my client. Some of the products are tiny, hard to measure.
Thank you
Regards
Lene
OK, is this easy to import by just adding product code and dimension? I really do not want to stuff up the product listings now. I know we can setup manual postage, I will check with my client. Some of the products are tiny, hard to measure.
Thank you
Regards
Lene
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202897
by lt635
Replied by lt635 on topic Australia Post - Warning: Division by zero
Hi Jerome,
My client has decided to go with manual postage so that solves my problem.
I just saw that I posted this in the wrong category.... sorry.
Thanks
Lene
My client has decided to go with manual postage so that solves my problem.
I just saw that I posted this in the wrong category.... sorry.
Thanks
Lene
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202876
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Australia Post - Warning: Division by zero
Hi,
The dimensions are using to calculate the "girth", in order to check that the package is not too big for shipping.
If you do not want to specify dimension, you can see to update manually the plugin, by replacing
By
In the file "plugins/hikashopshipping/aupost/aupost.php"
Regards,
The dimensions are using to calculate the "girth", in order to check that the package is not too big for shipping.
If you do not want to specify dimension, you can see to update manually the plugin, by replacing
Code:
case 'volume':
if(($product['x'] * $product['y'] * $product['z']) > $limit_value)
return false;
return (int)floor($limit_value / ($product['x'] * $product['y'] * $product['z']));
break;
case 'girth':
if(($product['x'] + $product['y']) * 2 > $limit_value)
return false;
return (int)floor($limit_value / (($product['x'] + $product['y']) * 2 ));
break;
Code:
case 'volume':
$divide = (float)($product['x'] * $product['y'] * $product['z']);
if(empty($divide) || $divide > $limit_value)
return false;
return (int)floor($limit_value / $divide);
break;
case 'girth':
$divide = (float)(($product['x'] + $product['y']) * 2);
if(empty($divide) || $divide > $limit_value)
return false;
return (int)floor($limit_value / $divide);
break;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.200 seconds