Jump to content
thirty bees forum
  • 0

Bug in order weight calculation


Question

Posted (edited)

I have an order consisting of 10 x 1kg of Product A, so the total weight should be 10kg, but in the order class it's given as 100kg.

I noticed this because the DHL shipping module I used wanted to calculate with 100g instead of with 10kg. I contacted the module developer and they checked and said it's a bug in thirty bees, because the order class says 100kg and that's where the module takes the weight from.

How can I help find where the issue is? Note: It was only one order out of many, so if it's a tricky issue it might not be worthwhile digging too deep to find where the bug is.

Edited by 30knees

8 answers to this question

Recommended Posts

  • 0
Posted

This has happened again - and it looks like it's only triggered when the weight exceeds 10kg. It then registers as 100kg. Is there anything I can do to troubleshoot?

  • 0
Posted

Thanks, @musicmaster!

Some additional information: It's with regard to variants/combinations. My main product has a weight of 0 and the variant has an additional weight of 1kg per unit.

I checked the tables (albeit after having corrected the weight in the DHL module) and I think we've found the culprit:

tb_product: It's correct, 0 for the main product.

tb_product_attribute: It's correct, 1kg.

tb_cart_product: Mine doesn't have weight.

tb_order_detail: It's correct, 10kg.

tb_orders: 139! (total_products_wt)

Where does the total_products_wt come from?

  • 0
Posted

total_products_wt: wt=with tax; So that is not relevant.

The function that you mentioned before gets things from the order_detail table.

However, I have my questions about your order_detail value. I checked it in my shop and I saw the weight for one product in that field. Not the total weight for the number of products that was ordered. 

I don't have time to dive deeper into this. But I suspect this could be the problem.

 

  • Like 1
  • 0
Posted

Thanks for the clarification and the help! 🙂

You're right! I've narrowed the bug down to the @Common-ServicesAmazon module. All orders imported from Amazon display for order_detail the weight x number of products (but we mostly get 1 item orders, so that's why it's such a rare occurrence).

  • 0
Posted

@datakick found and fixed the bug in 20 minutes. Thanks! I highly recommend his services: https://store.getdatakick.com/en/services He's fixed many buggy modules I've purchased elsewhere where the module developers couldn't or wouldn't provide support.

I contacted the folks at @Common-Services offering them datakick's patch, but they tried to sell me their support instead and then ultimately declined the patch. 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...