new registered member doesnt automaticly added to default group

Started by bonbin, July 14, 2012, 10:23:32 AM

Previous topic - Next topic

bonbin

hello,

i found a problem with my shopper group for new registered member
which when a new member register on my site, their account information will showing their shopper group as "blank"
but when i take a look on their account on my virtuemart back end shopper, they are already in the -default- shopper group

its only work if i remove them from -default-, and then adding them again to -default-


is there any solution for this problem? or is there someone else facing the same issue?


thanks
Robin

Milbo

The thinking is incorrect.

The pattern works so, when user is not in a group, the program is giving him virtually the default group. It is not stored. Make a joomla user and he will behave like being in the default group.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bonbin

hi milbo,

thank you for your respond,

do you mean, we need to put them into a group for each member before they can get the benefit for each shopper groups ?
the problem is, i have a coupon discount that only valid for registered member (-default-)
i also have a reseller group that already have a different pricing set for that groups, so i cant let the coupon work for all groups

the problem here is, if i set the coupon only work for -default- groups, my registered member(-default-) cant use the coupon since they are not really in -default- shopper groups

i take a look on the database virtuemart_vmuser_shoppergroups , and i found if the new user doesnt exist on that database table, unless, i re-adding them into -default- group


fyi : i force my user to register directly through virtuemart registration , and didnt register from joomla default registration

is there a way to fix this? i cant adding them manually since there will be a hunderd of registered member


thanks
Robin

John2400

Try this - everyone who registers is automatically in the default group.

* you can setup another group like wholesalers  and you can put people in that group ( manually)

* Now you want to give a coupon code to your registered group and give them a special ( then just set in configuaration that only registered users can buy) - thus they can use the shopping cart only if they are registered. therefore the code coupon will work.

* Maybe stay away from using the default group as a special group.  The coupon can be set for your wholesalers too , just add them to the code grouping as well.

bonbin

hello john,

my coupon and confiiguratiion its already as you said since before i open this thread

i do set the coupon work only for default, and anonymous (with awocoupon)
i set the different pricing for wholesale through taxes and calculation rules

everything will be fine if the registred member will automaticly added into default shopper group

but the fact is, they are not automaticly added into default shopper group is the main problem
i can see them already in default shopper group from my virtuemart backend
but, when the user login and see their account information, they are not in any of shopper group(their shopper group showing : blank)
i believe the problem come from the database, which when a new user registered, they are not added up into virtuemart_vmuser_shoppergroups` table
everytime user has registered, i need to open their profile in backend, and do the "save" manually to add them up into virtuemart_vmuser_shoppergroups table




here is some might useful information :

PHP version :    5.2.17
MySQL version :   5.0.95-community-log
Joomla : 2.5.4
Virtuemart  : 2.0.6


i didnt update to 2.0.8 because there is some other fix that i applied base on the solution that i found from this forum such as :

•email activation link
•fix for user agreement bugs with shopper fields
•change the table calling for country and the element for shipping by state
weight_countries.php : calling the state id instead of country , so i can create the shipping method by state
element/vmcountries.php :  i change the database calling from country into state on line 37-38 like the code below
$query = 'SELECT `virtuemart_state_id` AS value, `state_name` AS text FROM `#__virtuemart_states`
                WHERE `published` = 1 ORDER BY `state_name` ASC '


i dont really remember is there any change i made, but as i remember most of the change was the fix for some problem that i found the solution in forum
the only change i made is the shipping method from checkin the country database into state database


does any change i made above will make a problem for the shopper group?


thanks
Robin

bonbin

hi again,

update for this issue.


i did check it on my another site that are using the same joomla template and hosting without any customation

and the result is still the same, virtuemart didnt add a new registered member into their default group on table virtuemart_vmuser_shoppergroups

developer of awocoupon also did the test on his side, and he also getting the exactly same behavior, which virtuemart didnt add the new registered member into default groups
here is the link for his post
http://awodev.com/forum/awocoupon/help-section/need-help-coupon-doesnt-really-work-my-site

is there someone else facing the same issue? or just both of me and awocopun's developer that having this issue?

John2400

Your answer then is then to turn off awocoupons ( which i did for other reasons and test)- or even uninstall- then test.
The fact that you mentioned the third party software - is also having a problem will be your answer.

I was using awocoupons but it was breaking my core :"coupons"

bonbin

hi john, im sorry it have nothing to do with awo coupon
my another site using virtuemart as catalog only, so i dont need awocoupon @ there and i never install awocoupon on that domain :)


Milbo

Bonbin, please can you just read again what I wrote

We use a pattern for all default values. This pattern says, NEVER store a ***obscenity removed*** default value! When a value is missing GET the default value.

The reason is simple. When I store the default values, for example I selected "myvalue" and I change the default value in the config to "yourvalue". Then all users would stay in the group "myvalue". So when we store it, when there is a change of the default value, we have to update all values.

Sounds not so hard on the first view, but it is. What happens when you changed the standard of a user to "yourvalue" and then you make the default again to "myvalue". Your user, which you manually set into the group "yourvalue" would be suddenly in the "myvalue". To handle this, you need again more organisation,....

So we have the smart pattern. Dont store default values, get them dynamically. So there wont be never a solution for this issue, because there is no issue with the code. Understand the pattern.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/