News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

2.0.15d : Wrong calculation of weight

Started by atrus, December 17, 2012, 14:06:22 PM

Previous topic - Next topic

atrus

Hi to all,

We have noticed the following issue:

No matter what product we add in the cart, the weight of the product is always 0.001 (and of course the subsequent product methods based on weight are wrong).

We checked vm debug in the frontend and we saw the following:

"...vmdebug TRUE The variable weight = 0.001 of the ...."

As you can see the weight var passed is 0.001. We have checked the product details and the database and everything seem to be ok (uom, weight value, etc.) 

Using VM2.0.15d on Joomla 2.5.8 and PHP 5.3.17

Would appreciate any advice!

Rgrds,
Chris

Milbo

Hmm I just checked this an hour ago and it is working for me correctly. We may must do a skype session with screenshare. please write a pn to me, thank you.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus


Milbo

Very nice shop. It was a strange thing, first I saw your error, then I stored the product and then it worked. then I tried another product, worked also. But I found small glitches in the code. The whole thing is now buffered and there was a missing string to upper, so the conversion was executed even it was both the same unit. Please just test it now with other products. For me it works now.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

atrus

Thanks for the assistance Milbo, i can confirm also that the weight is now calculated correctly for all products; keep up the great job!

Rgrds,
Chris

Eric-iNerd

Hello,
This is my fist post and thank you for the joomla extension.

It seems that my site have a similar problem. tho my version is 2.0.16
When it comes to calculate the weight and then system to choose the shipment.

my product is weight in gram, and so is the shipment.

10 products x 11 gram = 111 + one product that is 32 gram = 142
i run the vmdebug the see what might be the problem. instead of 142 gram it seems it put 0.142
i made a shipment method to test "hent selv" 0 gram lower boundary and upper is 20KG
so this one i can choose

The problem goes for all my products and shipping methods.





        vmdebug self::$_jpConfig->lang nb_no
        vmdebug vmTime: loadConfig db no: 0.025184154510498
        vmdebug Start used Ram 11M
        vmdebug TRUE The variable weight = 0.142 of the shipmentmethod Hent selv is lower than the set 20
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Posten Norge 20 - 50g is NOT within Range of the condition from 5 to 40
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Posten Norge 20 - 50g
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Posten Norge 20 - 50g
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Posten Norge 20 - 50g
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Posten Norge 50 - 100g is NOT within Range of the condition from 40 to 90
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Posten Norge 50 - 100g
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Posten Norge 50 - 100g
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Posten Norge 50 - 100g
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Posten Norge 100 - 350g is NOT within Range of the condition from 90 to 330
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Posten Norge 100 - 350g
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Posten Norge 100 - 350g
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Posten Norge 100 - 350g
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Posten Norge 350 - 1000g is NOT within Range of the condition from 330 to 950
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Posten Norge 350 - 1000g
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Posten Norge 350 - 1000g
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Posten Norge 350 - 1000g
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Posten Norge 1 - 2 kg is NOT within Range of the condition from 950 to 1800
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Posten Norge 1 - 2 kg
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Posten Norge 1 - 2 kg
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Posten Norge 1 - 2 kg
        vmdebug FALSE The variable weight = 0.142 of the shipmentmethod Norgespakke egenemballert is NOT within Range of the condition from 1800 to 9000
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Norgespakke egenemballert
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Norgespakke egenemballert
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Norgespakke egenemballert
        vmdebug TRUE The variable weight = 0.142 of the shipmentmethod Hent selv is lower than the set 20
        vmdebug The value products quantity = 11 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug The value order amount = 1139 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug The value zip = 2000 passed, no boundary conditions set for the shipmentmethod Hent selv
        vmdebug vmTime: VirtuemartControllerCart Finished task : 0.85676693916321
        vmdebug End used Ram 28.25M
        vmdebug Peak memory peak 28.25M




//Eric



Milbo

Please use the latest version 2.0.16c. This version also makes the vmdebug better readable. check the vmdebug and post it again. thank you.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Eric-iNerd

Thank you for your quick reply.
i now Installed version now is 2.0.16c


Product Weight 11.0000 Gramme

This is the new message, i choose 10 x of the last product.
   

        vmdebug self::$_jpConfig->lang nb_no
        vmdebug vmTime: loadConfig db no: 0.02530312538147
        vmdebug Start used Ram 11M
        vmdebug shipmentmethod Hent selv = TRUE for variable weight = 0.00011 Reason: is lower than the set 20
        vmdebug shipmentmethod Hent selv = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 20 - 50g = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 5 to 40
        vmdebug shipmentmethod Posten Norge 20 - 50g = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 20 - 50g = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 20 - 50g = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 20 - 50g = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 50 - 100g = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 40 to 90
        vmdebug shipmentmethod Posten Norge 50 - 100g = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 50 - 100g = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 50 - 100g = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 50 - 100g = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 100 - 350g = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 90 to 330
        vmdebug shipmentmethod Posten Norge 100 - 350g = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 100 - 350g = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 100 - 350g = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 100 - 350g = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 350 - 1000g = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 330 to 950
        vmdebug shipmentmethod Posten Norge 350 - 1000g = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 350 - 1000g = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 350 - 1000g = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 350 - 1000g = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 1 - 2 kg = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 950 to 1800
        vmdebug shipmentmethod Posten Norge 1 - 2 kg = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 1 - 2 kg = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 1 - 2 kg = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Posten Norge 1 - 2 kg = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Norgespakke egenemballert = FALSE for variable weight = 0.00011 Reason: is NOT within Range of the condition from 1800 to 9000
        vmdebug shipmentmethod Norgespakke egenemballert = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Norgespakke egenemballert = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Norgespakke egenemballert = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Norgespakke egenemballert = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable weight = 0.00011 Reason: is lower than the set 20
        vmdebug shipmentmethod Hent selv = TRUE for variable products quantity = 10 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable order amount = 990 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable zip = 2000 Reason: no boundary conditions set
        vmdebug shipmentmethod Hent selv = TRUE for variable virtuemart_country_id, Reason: no boundary conditions set
        vmdebug vmTime: VirtuemartControllerCart Finished task : 0.74055695533752
        vmdebug End used Ram 29.5M
        vmdebug Peak memory peak 29.5M

\\Eric


jegbertzen

Hi,

I had the same problem.

I found that there was something wrong with a stored product as some items worked and some didn't. So I recreated the the items that did not work, and voila... it worked!

strange but true for me!

kind regards,
Jeroen

Eric-iNerd

All my products have the weight trouble, also new ones.
i have now updated to 2.0.20a and i still have this problem.

i'm stuck, anyone have some more input?  :'(

olgavreb

Quote from: Milbo on December 17, 2012, 17:12:08 PM
...then I stored the product and then it worked. then I tried another product, worked also. But I found small glitches in the code. The whole thing is now buffered and there was a missing string to upper...

I have exact the same problem: debug function tells that the weight is always 0.001, but it's not possible.  Sometimes the weight calculation works, but very seldom...I have no idea what is wrong. How did you solved this Problem? I tried to delete and re-create the shopping rools, it worket for me for some hours, but now I have this problem again.


I have the virtuemart 2.020 b.
this is my shop  www.autoteileswiss.net

P.S. you have to be registred befor you can see the prices)