News:

Looking for documentation? Take a look on our wiki

Main Menu

Attention no standard shopper group set

Started by mabeall32, February 07, 2012, 04:44:22 AM

Previous topic - Next topic

mabeall32

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

$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

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

enock

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

not the id the value of default
UPDATE `#__virtuemart_shoppergroups` SET `default`=2 WHERE `virtuemart_shoppergroup_id`=1
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

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

Next version has a fixing tool, which should fix it, when you update.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

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

manually changing this worked forme

[attachment cleanup by admin]

Milbo

The virtuemart_shoppergroup_id is unimportant. You need only one group with "default" set to 1 and another to 2
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jacquedonald

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

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

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:
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;

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??
$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

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

nicedoggie

Is there a fix for this? 

If so, what are the steps?