News:

Looking for documentation? Take a look on our wiki

Main Menu

Customer Number / ID missing when user is created in VM backend

Started by aravot, September 13, 2007, 22:57:36 PM

Previous topic - Next topic

Soeren

Does someone have a suggestion how to solve this problem?
This would be a new feature, as new customers never automatically received a Customer ID during registration.

ciao, Sören
The future of eCommerce: VirtueMart & Joomla!
http://virtuemart.net


aravot

Quote from: gregdev on September 15, 2007, 14:26:10 PM
Since the customer number is not really used in VirtueMart right now, perhaps we should discuss what it is and what its purpose is.


What is a customer number used for?
My guess to ensure uniqueness / verification of customer.

What should a customer number look like? length? characters?
I checked my Dell, Newegg, Staples and Office Depot accounts customer numbers are numeric and were 8 characters long.

How might it be used to integrate VM with other systems?
Don't know, my guess verification, ensure there is no mix up if members have the same name or lastname or both.

When would a customer number be visible
Yes

Can a customer number be changed? If so, by whom? the shop owner?
Only by shop owner.

Should it just be a blank field that is populated by external programs for integration?
Don't know

Below is an example of Dell's; ordered an AC adapter few days ago (removed some info for security)


willowtree

customer number is used (vm 1.0.13) in shopper_vendor_xref to assign shopper groups
Please add your VM and Joomla Version to your signature to make it easier to help you:

Most of my code posted in the forum is for VirtueMart 1.0  -  not for 1.1

webdesco

Hi,
for all this is an old topic I'm currently running 1.1.6 and this issue still exists.
To at least provide a unique customer in the backend so as it reflects the front end I've modified line 398 of ps_shopper_group.php
from
return $db->f("customer_number");
to

return ($db->f("customer_number") == "") ? uniqid( rand() ) : $db->f("customer_number");

The above seems to work Okay when adding a new user however there is a glitch when modifying an existing user that has a blank customer_number (i.e one that was added before I added this mod).  The script recognises that the customer number is blank and generates a new one, this new code is shown in the edit form, however it is not saved when you click save, as when you edit the same user a different (new random) customer number is shown.
Not too much of an issue as I'll be deleting the test users that have a blank customer_number anyway. Any thought?