Welcome, Guest. Please login or register.
Login with username, password and session length


Need help or want to talk to other developers? Join the VirtueMart Chat! Read more...

  Advanced search

247038 Posts in 67506 Topics- by 258314 Members - Latest Member: aniketana
VirtueMart ForumVirtueMart 1.1.xCustomer / User ManagementAssigning users to a specific shopper group on sign-up?
Pages: 1 [2]   Go Down
Print
Author Topic: Assigning users to a specific shopper group on sign-up?  (Read 6531 times)
cakotr
Newbie
*
Posts: 4


« Reply #15 on: January 23, 2011, 07:03:48 AM »

interesting.. I have Joomla 1.5.22 with Virtuemart 1.1.5.
Your system Joomla 1.5.21 with Virtuemart 1.1.5. so the problem about this?

in addition, when I applied this codes in my system everything seems cool.. when user is being register, the user see this choice but even if the user choose *wholesale group.. the user is still in default group Sad
« Last Edit: January 23, 2011, 07:15:37 AM by cakotr » Logged
Tim ceko
Newbie
*
Posts: 17


« Reply #16 on: January 23, 2011, 08:19:32 AM »

when you created your drop down box, for the option, did you enter in the number value for the shopper group?  (i.e. the default values from a new install for the default shopper_group_id is 5 and the default 'wholesale' shopper_group_id value is 7).  If you enter the word "wholesale" for the value it will not work, it needs to be the number value.

Also, the name 'vm_selectshoppergroup' is required.
Logged
cakotr
Newbie
*
Posts: 4


« Reply #17 on: January 23, 2011, 12:10:59 PM »

when you created your drop down box, for the option, did you enter in the number value for the shopper group?  (i.e. the default values from a new install for the default shopper_group_id is 5 and the default 'wholesale' shopper_group_id value is 7).  If you enter the word "wholesale" for the value it will not work, it needs to be the number value.

Also, the name 'vm_selectshoppergroup' is required.
I am pretty sure that I wrote correct group number.. I checked the number with you way that I clicked the group and looked at web links..
If there are no special code for you, Can you share 2 files?
ps_shopper.php and ps_userfield.php

I've had the problem for a long time and it makes me so sad..
Logged
Trakse
Newbie
*
Posts: 2


« Reply #18 on: January 24, 2011, 09:45:18 AM »

I know this post was a little old so I'm not sure if this will help anyone...  I DO NOT certify that this will not break any other part of your Joomla/VM install, but it worked for me on Joomla 1.5.21 with Virtuemart 1.1.5.

Basically, my problem was that I needed a field to assign users to a shopper group during registration.  I was not using the euvat, b/c that field did not fit the bill for what i needed.

SO... I modified 2 files found in /administrator/components/com_virtuemart/classes/ and then created a select box for selecting shopper group.  Here is a step by step of what i did.  PLEASE NOTE: I know this is not the best code or probably the best way to do this, but, for my requirements, it just has to work and this did.

Hi, thank you for this very useful tip.

I'm using Joomla 1.5.22 with Virtuemart 1.1.6. I made the modifications, I can see the dropdown menu on the register page. But when registration is complete, I receive an error 500 - no valid database connection. In my VM admin, I see the created user but with no shopper group selected (a trash bin logo appears instead).

Since I'm a total newbie with PHP, I have no clue at all on how to fix it. Any suggestions? Thanks in advance!
« Last Edit: January 24, 2011, 10:02:03 AM by Trakse » Logged
Trakse
Newbie
*
Posts: 2


« Reply #19 on: February 01, 2011, 09:43:31 AM »

There's an update : This 500-error message is related to another component, JoomFish. I removed this component and I can register. But Virtuemart won't assign my user to the specified usergroup.

Any idea? Thanks.
Logged
lrossy
Newbie
*
Posts: 15


« Reply #20 on: February 09, 2011, 17:53:09 PM »

i just implemented the same functionality in my site using this post as a start

http://forum.virtuemart.net/index.php?topic=79386.0

I then added my own hack to make the shopper group switch happen on the account maintenance page as well.

Good luck
« Last Edit: February 09, 2011, 17:55:35 PM by lrossy » Logged
jstratos
Newbie
*
Posts: 19


« Reply #21 on: March 28, 2011, 00:30:58 AM »

Has anyone found a solution here?  I tested this and got Syntax errors on this line of code:
Code:
if (!empty($d['vm_selectshoppergroup'])) {
     $d['shopper_group_id'] = $d['vm_selectshoppergroup'];
     }

I tried this but still not working:
Code:
if( empty($d['vm_selectshoppergroup'])) {
     $d['shopper_group_id'] = $d['vm_selectshoppergroup'];
     }
Logged
jorg.vgp
Newbie
*
Posts: 2


« Reply #22 on: April 14, 2011, 02:52:02 AM »

Hello.
First of all, it seems a excellent hack. But can't make work this hack. I make changes like explain. My joomla is 1.5.20 and my virtuemart 1.1.5 .  I make all changes, but when i change my new field in user account, change and save this field but don't change shopper group id. the values in maintenance account are the shoppergroup_id and every think its ok. Anyone could send me ps_shopper.php or ps_userfield.php whit changes?

Sorry for my english.
thank you everyone.
Logged
johnlanglois
Newbie
*
Posts: 23


« Reply #23 on: April 21, 2011, 10:05:08 AM »

Tim,
Thank you for posting this.
I have been looking for the logic on this and your work showed me the way.

I just used it in VM 1.18 and it still works.

A note to those having trouble.  Pay special attention to placing the code after the VAT test statement closing bracket.(if($d['isValidVATID'] statement)).
It's easy to get it in the wrong spot, which results in erratic execution.

Also, the shopper group needs to be a number, not a description.
Logged
moleculezz
Newbie
*
Posts: 24


« Reply #24 on: May 03, 2011, 02:56:21 AM »

I am using the default EUVAT check, but the default functionality doesn't even work. I made a new shopper group and I selected the new group for successful validation of EUVAT. If I enter an invalid number I get an error message as it should. If I enter a valid number it processes the registration but when I check in the backend it shows the user still in the default shopper group.
Logged
jgodek1
Newbie
*
Posts: 3


« Reply #25 on: June 16, 2011, 10:26:30 AM »

I have the same problem. EUVAT doesnt send to the shopper group as selected. I have a new version of VMART, all up to date. Joomla 1.5
any ideas?
Logged
Pages: 1 [2]   Go Up
Print
Jump to: