VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: srajca on June 30, 2012, 22:09:20 PM

Title: cart issue after upgrade to 2.0.8
Post by: srajca on June 30, 2012, 22:09:20 PM
Hello after upgrade when I go to cart it writes this before the cart
Quote
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start: method->weight_stop:2 result:1
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start:2 method->weight_stop:5 result:
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start:5 method->weight_stop:10 result:
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start:10 method->weight_stop:15 result:
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start: method->weight_stop: result:1
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start: method->weight_stop:2 result:1
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start: method->weight_stop:2 result:1
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209
        Info: weigth_countries _weightCond orderWeight:0.231 method->weight_start: method->weight_stop:2 result:1
        Info: weigth_countries _nbproductsCond nbproducts:1 method->nbproducts_start:0 method->nbproducts_stop:0 result:1
        weigth_countries _orderamountCond cart_amount:16.275 method->orderamount_start:0 method->orderamount_stop:0 result:
        weigth_countries _zipCond zip:4209

it's a very long list and very annoying. Any suggestions.
Also my add to cart button in category view doesn't work now. And I'm pretty sure that there will be some other stuff - hopefully not. Any help will be greatly appreciated.
Thank you
Title: Re: cart issue after upgrade to 2.0.8
Post by: patrik60 on July 01, 2012, 11:37:51 AM
Same problem here. But this happens only, when I'm logged in as an administrator.

[attachment cleanup by admin]
Title: Re: cart issue after upgrade to 2.0.8
Post by: Milbo on July 01, 2012, 12:46:48 PM
What you see is a debug message, only for administrators. Very often people dont have any shipment or payment to select, so this shows what is going on in the background.
Title: Re: cart issue after upgrade to 2.0.8
Post by: patrik60 on July 01, 2012, 12:52:03 PM
Thank you.
Title: Re: cart issue after upgrade to 2.0.8
Post by: srajca on July 02, 2012, 11:27:58 AM
Thank you Milbo, however I do have at least 3 payment methods and 2 different shipment methods or even more if you count the ones that are valid only after a certain weight is obtained.
Title: Re: cart issue after upgrade to 2.0.8
Post by: srajca on July 02, 2012, 11:48:42 AM
Well but that doesn't bother me since it's only for the admin, but my add to cart button in category view isn't working anymore. Any suggestions?
Title: Re: cart issue after upgrade to 2.0.8
Post by: patrik60 on July 02, 2012, 17:29:06 PM
Check this topic. Is it the problem you get?

http://forum.virtuemart.net/index.php?topic=104662.0
Title: Re: cart issue after upgrade to 2.0.8
Post by: dinoide on August 31, 2012, 13:24:19 PM
THE SOLUTION FOR THIS STUPID MESSAGE ARE "ELIMINATE THEM"

Go to plugins/vmshipment/weight_countries/weight_countries.php

and COMMENT all entries with: vmAdminInfo ('weigth_countries BLA BLA BLA...

f.i.

private function _weightCond ($orderWeight, $method) {

      $weight_cond = (($orderWeight >= $method->weight_start AND $orderWeight <= $method->weight_stop)
         OR
         ($method->weight_start <= $orderWeight AND $method->weight_stop === ''));
      vmAdminInfo ('weigth_countries _weightCond orderWeight:' . $orderWeight . ' method->weight_start:' . $method->weight_start . ' method->weight_stop:' .
         $method->weight_stop . ' result:' . $weight_cond);
      return $weight_cond;
   }

generates stupid and unusefull messages...
to avoid them:

private function _weightCond ($orderWeight, $method) {

      $weight_cond = (($orderWeight >= $method->weight_start AND $orderWeight <= $method->weight_stop)
         OR
         ($method->weight_start <= $orderWeight AND $method->weight_stop === ''));
/**   
*   vmAdminInfo ('weigth_countries _weightCond orderWeight:' . $orderWeight . ' method->weight_start:' . $method->weight_start . ' method->weight_stop:' .
*         $method->weight_stop . ' result:' . $weight_cond);
*/

      return $weight_cond;
   }

and that all. Repeat that in all calls to vmAdminInfo.

I can understand why Virtuemart designers included all the vmAdminInfo calls to see it in the front-end.

The problem is also that vmAdminInfo calls are read by any other user in the front-end, not only admin user. Other bug... but I don't care. In both cases message are 100% usefulness and should be eliminated.

Best Regards,

I lost some hours with this stupid problem that appear each time that I update from official VM release...

This is a workaround, when a new VM release will come, the stupid blue messages will reappear...
until designers will delete them or correct the bug for vmAdminInfo calls.
Title: Re: cart issue after upgrade to 2.0.8
Post by: Milbo on August 31, 2012, 21:02:19 PM
It is a lot easier just to change the vmAdminInfo function.

and it is not a stupid message. in fact we think about to change the message against.

"DO NOT TEST YOUR SHOP AS ADMIN"
Title: Re: cart issue after upgrade to 2.0.8
Post by: jjk on August 31, 2012, 21:41:19 PM
Quote from: dinoide on August 31, 2012, 13:24:19 PM
THE SOLUTION FOR THIS STUPID MESSAGE ARE "ELIMINATE THEM"
I lost some hours with this stupid problem that appear each time that I update from official VM release...

Couldn't resist to comment the above, too: The smart users just select 'No debug' in VM2 configuration. Your "Solution" is for the crazy ones.  ;D

No Offense - Best Wishes,

jjk
Title: Re: cart issue after upgrade to 2.0.8
Post by: patrik60 on September 01, 2012, 01:52:11 AM
QuoteCouldn't resist to comment the above, too: The smart users just select 'No debug' in VM2 configuration. Your "Solution" is for the crazy ones.
Can't resist to comment your comment: it's not correct. ;) These messages still appear!

And it really makes no sense to test the own shop as an administrator.
Title: Re: cart issue after upgrade to 2.0.8
Post by: jjk on September 01, 2012, 08:57:44 AM
Ok, I don't remember getting these notices on my own VM2 installation, but looking at this in the SVN repository I noticed that these lines were changed after the release of VM2.0.10. There still is a typo ('weigth' instead of 'weight'), but the lines are commented now anyway. See screenshot.




[attachment cleanup by admin]
Title: Re: cart issue after upgrade to 2.0.8
Post by: alatak on September 01, 2012, 11:33:49 AM
Hello

QuoteCan't resist to comment your comment: it's not correct.  These messages still appear!

The messages appears when you are logged in as Admin.
It may not have been a good idea... but you should not test your shop as admin user.
May be the best is to have a "debug" option in the plugins, that you can turn on.off.
Meanwhile the messages are removed. They will not be displayed in the next versions. (> 2.0.10)
Title: Re: cart issue after upgrade to 2.0.8
Post by: Anypc on September 03, 2012, 11:15:27 AM
Well, ofcourse you test the basic functions of the shop as administrator...

I run a testsite where I test the newest version before installing it on my live site. The testsite is a direct copy from the live site. I had a customer buy something whilst I was testing functionality on the testsite.
So now I closed the testsite to public, and if I want to test something I log in as administrator because normal users can't see a closed site..

I also get this message by the way.
Title: Re: cart issue after upgrade to 2.0.8
Post by: Milbo on September 04, 2012, 00:51:36 AM
But as admin, you should be smart enough to ignore them. On the other hand, yes they may hide the important messages, because your brain is considering them as spam
Title: Re: cart issue after upgrade to 2.0.8
Post by: ncwebpros on September 08, 2012, 22:37:22 PM
I'm running Virtue Mart 2.0.10 on Joomla 2.5.6 site and I'm getting the same error with "No Debug" selected. (see attached)

The only reason it bothers me is that I give my clients admin access and it is literally freaking her out to see that message. (She is withholding final payment because she is convinced there is something buggy with the system). Wonder why "No Debug" is not having any effect?

Can I hide that from showing up?

[attachment cleanup by admin]
Title: Re: cart issue after upgrade to 2.0.8
Post by: patrik60 on September 08, 2012, 22:52:45 PM
read this: https://forum.virtuemart.net/index.php?topic=104653.msg357984#msg357984

or download the latest version from the svn.