News:

Looking for documentation? Take a look on our wiki

Main Menu

cart issue after upgrade to 2.0.8

Started by srajca, June 30, 2012, 22:09:20 PM

Previous topic - Next topic

srajca

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

patrik60

#1
Same problem here. But this happens only, when I'm logged in as an administrator.

[attachment cleanup by admin]

Milbo

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.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/


srajca

#4
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.

srajca

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?


dinoide

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.

Milbo

#8
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"
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jjk

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
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

patrik60

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.

jjk

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]
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

alatak

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)

Anypc

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.
Prowd owner of webshop:
www.AnY-Computers.nl

Version J2.5.4 with VM 2.0.3E.

Milbo

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
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/