Author Topic: Attention no standard shopper group set  (Read 36817 times)

mabeall32

  • Jr. Member
  • **
  • Posts: 116
Attention no standard shopper group set
« on: February 07, 2012, 04:44:22 am »
I have installed 2.0.1e and now I get this.  if you are logged in it goes away.  it's only when you are not logged in.

mabeall32

  • Jr. Member
  • **
  • Posts: 116
Re: Attention no standard shopper group set
« Reply #1 on: February 09, 2012, 03:28:59 am »
$kind value is set to 2 when not logged in; the field "default" is either 0 or 1 so the statement is always false.
administrator/components/com_virtuemart/models/shoppergroup.php
 * Get default shoppergroup for anonymous and non anonymous
  * @param unknown_type $kind
  */
 function getDefault($kind = 1){
  $kind = $kind + 1;       
  $this->_db->setQuery('SELECT * FROM `#__virtuemart_shoppergroups` WHERE `default` = "'.$kind.'" AND `virtuemart_vendor_id` = "1" ');
 
  if(!$res = $this->_db->loadObject()){
   $app = JFactory::getApplication();
   $app->enqueueMessage('Attention no standard shopper group set '.$this->_db->getErrorMsg());
  } else {
   return $res;
  }
 }

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Attention no standard shopper group set
« Reply #2 on: February 09, 2012, 12:38:31 pm »
Then you do not have the anonymous shoppergroup, which has for default the value 2. Hmm I should readd the check for it in the updater
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

enock

  • Beginner
  • *
  • Posts: 40
Re: Attention no standard shopper group set
« Reply #3 on: February 09, 2012, 22:45:02 pm »
I get this problem too

I checked the DB and the -anonymous- group had a virtuemart_shoppergroup_id of 1 - I manually changed it to 2 - still get Attention no standard shopper group set

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Attention no standard shopper group set
« Reply #4 on: February 10, 2012, 00:37:32 am »
not the id the value of default
UPDATE `#__virtuemart_shoppergroups` SET `default`=2 WHERE `virtuemart_shoppergroup_id`=1
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

  • Beginner
  • *
  • Posts: 18
Re: Attention no standard shopper group set
« Reply #5 on: February 11, 2012, 01:34:11 am »
Hello, I followed your instructions and the message goes away but when i attempt to create a new account and checkout with it, i get the message again in the cart
Attention no standard shopper group set
Attention no standard shopper group set
Attention no standard shopper group set
Attention no standard shopper group set
Attention no standard shopper group set
Attention no standard shopper group set
Attention no standard shopper group set

Just like so.

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Attention no standard shopper group set
« Reply #6 on: February 11, 2012, 13:26:18 pm »
Next version has a fixing tool, which should fix it, when you update.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

  • Beginner
  • *
  • Posts: 18
Re: Attention no standard shopper group set
« Reply #7 on: February 11, 2012, 14:12:30 pm »
OK thanks for the reply, I downgraded the site back to 1.7 and I am not having the problems with the same version of VM (2.0.1f) - it must be a joomla 2.5 issue i would guess...

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10428
  • VirtueMart Version: 3+
Re: Attention no standard shopper group set
« Reply #8 on: February 12, 2012, 14:24:19 pm »
manually changing this worked forme

[attachment cleanup by admin]

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Attention no standard shopper group set
« Reply #9 on: February 12, 2012, 15:21:14 pm »
The virtuemart_shoppergroup_id is unimportant. You need only one group with "default" set to 1 and another to 2
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

  • Beginner
  • *
  • Posts: 18
Re: Attention no standard shopper group set
« Reply #10 on: February 13, 2012, 07:19:13 am »
Yes I did this too in that table and it fixes it but it seems to come back after you make any other shop configuration changes as if some other proc is triggering it back.
I tried this a couple of times and it never stuck. The only way I completely got rid of it was to downgrade to joomla 1.7.

waldseedesign

  • Beginner
  • *
  • Posts: 1
Re: Attention no standard shopper group set
« Reply #11 on: February 26, 2012, 10:50:26 am »
Think i had a solution..

administrator/components/com_virtuemart/models/shoppergroup.php

Line 133-134:

function getDefault($kind = 1){
  $kind = $kind + 1;   

changed to:

function getDefault($kind = 1){
  $kind = $kind = 1;   

"Attention no standard shopper group set" is away

Thomas Kuschel

  • Jr. Member
  • **
  • Posts: 81
    • LOYTEC electronics GmbH
Re: Attention no standard shopper group set
« Reply #12 on: February 29, 2012, 16:06:06 pm »
Hello, I had the same problem after upgrading 1.1.9 to 2.0.2
I got the Info "Attention no standard shopper group set";
also the Notice: Notice: Trying to get property of non-object in /home/tkuschel/workspaces/cms/joomla/administrator/components/com_virtuemart/views/user/view.html.php on line 232
In the backend, I got only my three Shopper Groups from the 1.1.9 version, but no -anonymous- group there.
First I reordered my table with the following SQL:
Code: [Select]
UPDATE `jos_virtuemart_shoppergroups` SET `virtuemart_shoppergroup_id` = `virtuemart_shoppergroup_id` +1 WHERE 1 ORDER BY `virtuemart_shoppergroup_id` DESC;
Now all other shopper groups are incremented by 1, then I added an "-anonymous-" group with the values
virtuemart_shoppergroup_id = 1, virtuemart_vendor_id = 1, shopper_group_name = "-anonymous-", and default=2;

Code: [Select]
INSERT INTO `cms`.`jos_virtuemart_shoppergroups` (`virtuemart_shoppergroup_id` ,`virtuemart_vendor_id` ,`shopper_group_name` ,`shopper_group_desc` ,`custom_price_display` ,`price_display` ,
`default` ,`ordering` ,`shared` ,`published` ,`created_on` ,`created_by` ,`modified_on` ,`modified_by` ,`locked_on` ,`locked_by`)
VALUES ('1', '1', '-anonymous-', 'This is an anonymous group.', '0', NULL , '2', '0', '0', '0', '2012-02-29 14:00:00', '42', '2012-02-29 14:00:00', '42', '0000-00-00 00:00:00', '0');

So I got rid off these messages, any further steps?

The postings before, to change the line 133 in shoppergroup.php would have side effects. The function getDefault() is used to get either the default or the anonymous shopper group.
BUT: there may be done a REWORK inside the shoppergroup.php; There is in line 153 / 159 also a bug??
Code: [Select]
$defaultSgId = $this->getDefault(0);
$anonymSgId = $this->getDefault(1);

foreach($ids as $id){

//Test if shoppergroup is default
if($id == $defaultId->virtuemart_shoppergroup_id){

The first generated object $defaultSgId is never used in this function / and the test is with an object $defaultId  :-(

Seen in Version VM 2.0.2

Regards
Thomas

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10094
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Attention no standard shopper group set
« Reply #13 on: February 29, 2012, 16:58:24 pm »
Using the update tool again helps most time also. I would try that first.

I also do not understand the "fix" of waldseedesign. It maps afaik wrong.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

nicedoggie

  • Beginner
  • *
  • Posts: 16
Re: Attention no standard shopper group set
« Reply #14 on: February 29, 2012, 23:55:55 pm »
Is there a fix for this? 

If so, what are the steps?