X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   Anonymous to registered customer conversion (https://forum.x-cart.com/showthread.php?t=66713)

quietcoolone 04-25-2013 01:07 PM

Anonymous to registered customer conversion
 
Customers who purchase anonymously are not able to sign in to check order history etc.
Later on, many of these customers decide to create accounts with hopes of being able to check their orders, however that is not possible.
I've tried associating their newly created accounts to their orders by adding the userid to xcart_orders table etc, but that has resulted in a 403 error.
Being able to do this would be great for my customers.

My question is:
Is there any software or add-on that can be used to associate anonymous customers to existing orders?

Thanks.

CenturyPerf 07-29-2013 12:33 PM

Re: Anonymous to registered customer conversion
 
Since no one else has posted a reply, I too am getting more customers who have ordered anonymously getting frustrated that they cannot login to check on their orders.

Aside from disabling anonymous checkout, is there any way to change a customer from anonymous to registered?

quietcoolone 07-29-2013 12:51 PM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by CenturyPerf
Since no one else has posted a reply, I too am getting more customers who have ordered anonymously getting frustrated that they cannot login to check on their orders.

Aside from disabling anonymous checkout, is there any way to change a customer from anonymous to registered?


I'm still waiting on an answer -- seems like this is not an issue for many but its good to know that i'm not the only one.

carpeperdiem 07-29-2013 04:20 PM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by quietcoolone
seems like this is not an issue for many


Sure it is.
I have at least one or two a day...

customer: I LOVE your products! I want to convert to a full registration.
me: Great! I will get you bonus points for your prior orders, but I can't merge your activity.
customer: OK.
me: I wish I could merge anon + new account so I have a happier customer.

THE PROBLEM is that an anon "customer" is not a customer.
I don't think we can technically call it a "bug" -- but it sure is a design oversight.

I think the solution is:

1. have the anon customer "register"
2. "assign" or "convert" an anon order to the new "registered" customer.

Anyone have any ideas how to accomplish #2?

quietcoolone 07-29-2013 04:46 PM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by carpeperdiem
Sure it is.
I have at least one or two a day...

customer: I LOVE your products! I want to convert to a full registration.
me: Great! I will get you bonus points for your prior orders, but I can't merge your activity.
customer: OK.
me: I wish I could merge anon + new account so I have a happier customer.

THE PROBLEM is that an anon "customer" is not a customer.
I don't think we can technically call it a "bug" -- but it sure is a design oversight.

I think the solution is:

1. have the anon customer "register"
2. "assign" or "convert" an anon order to the new "registered" customer.

Anyone have any ideas how to accomplish #2?


This is what i wrote in my initial post:
"I've tried associating their newly created accounts to their orders by adding the userid to xcart_orders table etc, but that has resulted in a 403 error."

cflsystems 07-29-2013 05:10 PM

Re: Anonymous to registered customer conversion
 
To me this is a bug and serious design flow. I have mentioned few times in the forum and to QT that if person places an order on the site this person is a customer. No matter if they have registered or not.
Started with when email as login was implemented anon customers do not get an entry in customers table hence they are phantoms. The only entry for them is orders table. But trying to only replace userid may not work as there is more info which they may have provided differently as anon customers.
Not saying that having anon customers in customers table would solve merge problem but would make it easier to do this probably.

BCSE 07-29-2013 05:54 PM

Re: Anonymous to registered customer conversion
 
Well it also depends on what X-cart versions. Older versions did create customer accounts for anonymous users. So it was easier to convert them to real users. So we could create something easily for earlier versions but something for the latest versions would require a good bit more edits unfortunately. I do think it's something that would be convenient.

Feel free to drop us an email if you'd like to see this (http://www.bcsengineering.com/contact_us/#contact_form ) and mention this thread. If it's not too hard we'll make it a free module, otherwise it sounds like a good small module.

Carrie

carpeperdiem 07-29-2013 06:00 PM

Re: Anonymous to registered customer conversion
 
Thinking out loud:

Expecting X-Cart to fix or change this? We know the answer.

OT: I reported a bug about x-payments connector log files not being visible in the admin, and they tell me [9 months after I reported it] that this is a feature request, not a bug - after many years, I've learned that "if the programmer wrote the code so that it does exactly what the interface designer specced, it's done". Even if the design or spec is defective. X-Cart thinks like programmers, and not designers. Accept it.

So let's take a look at an order from an anon vs. an order from a registered customer...

I have a 4.5.5 default with no customers and no orders. I did the following:

1. placed order as an anon customer. phone ordering. then set status of order to "complete"
2. registered user ID #5 (other IDs are admins). Placed an order as customer #5 logged in. set status of order to "complete".
3. search for all orders: order #1 is anon; order #2 is registered cust #5 -- ok, let's have some fun now...

4. REGISTER the anon customer -- same name, address, email -- anon customer is now registered as ID 7

5. phpMyAdmin...
table: xcart_customers
evaluate customer IDs... anon customer ID = 7

table: xcart_orders
evaluate both orders -- the anon order does not have a userid set (it's empty)

6. edit the anon order. set userid to 7

That's all folks... so this can be done.
- phone order (least complicated order)
- what if order was with paypal
- or x-payments
- or other payment methods?

Is it possible to make a button or function that edits an order and sets a userID? The "OBVIOUS" place would be here:

/admin/order.php?orderid=2&mode=edit&show=customer

Ah, the AOM can of worms.

What is tricky here, the anon customer must FIRST become a registered customer before setting the userid in the orders table.

SO what is the ideal workflow?

cflsystems 07-29-2013 08:40 PM

Re: Anonymous to registered customer conversion
 
The ideal workflow for XC 4.4.x and up (I think not saving anon customers started with 4.4.x)

1. Use the default XC search for orders to search based on customer data - since there is no customer you cannot search users.
2. Found some orders - mark the orders (just like marking them for deletion) and there should be a button on the page - assign these orders to customer.
3. Next to the button can be a dropdown list of all registered customer to select from so click on button and the script will assign the orders to that customer based on customer id...

Of course customer has to be created first

Not that hard to do. There could be a little bit more than just adding userid to orders table though but as Carry mentioned it is easy enough to be free mod

carpeperdiem 07-29-2013 09:47 PM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by cflsystems
3. Next to the button can be a dropdown list of all registered customer to select from so click on button and the script will assign the orders to that customer based on customer id...

Of course customer has to be created first


Possibly avoid a dropdown since this can be 1000's of customers and can slow page load considerably?

The magic function (button?) would be the "convert anon customer into a registered customer" - I did this by brute force... (copy/paste) but this is one function that could really benefit from a magic button. It probably should also create a default password and check the "force password change on next login" box.

Once that is done, "assigning" the now-registered customer to the order should only require the one table to be edited. Yes?

Anyone see issues?

BCSE 07-30-2013 03:52 AM

Re: Anonymous to registered customer conversion
 
I can see two main uses of it:

1. The user is created first and then you assign an order to it
or
2. The customer hasn't created a user first and you want to create one for them.

I think having both options available are important. Some customers are as 'savvy' and you wouldn't want to make them register first, or maybe you want to do the legwork for them. All the info is already in the order and most people use email as login, so just create a dummy password that has to be changed.

So I think having both options is important, don't you guys?

Carrie

quietcoolone 07-30-2013 08:34 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by BCSE
I can see two main uses of it:

1. The user is created first and then you assign an order to it
or
2. The customer hasn't created a user first and you want to create one for them.

I think having both options available are important. Some customers are as 'savvy' and you wouldn't want to make them register first, or maybe you want to do the legwork for them. All the info is already in the order and most people use email as login, so just create a dummy password that has to be changed.

So I think having both options is important, don't you guys?

Carrie

In my experience most customers go online to check on their orders the realize they don't have an account. They then create one but soon realize they is no order history etc. So option 2 would be most beneficial.

Option 1 also makes sense because it won't require any additional work on the customer end. Customers email is used to register and assigned a generic password which the customer can change after login.

BCSE 07-31-2013 05:47 AM

Re: Anonymous to registered customer conversion
 
We usually have #2 as an issue. They don't realize they didn't create an account. We'll likely do both.

I'm going to see how hard this is to do. I need you guys to reply as to what versions of X-cart you want this for.

thanks,

Carrie

quietcoolone 07-31-2013 06:17 AM

Re: Anonymous to registered customer conversion
 
4.4.5

carpeperdiem 07-31-2013 06:18 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by BCSE
We usually have #2 as an issue. They don't realize they didn't create an account. We'll likely do both.

I'm going to see how hard this is to do. I need you guys to reply as to what versions of X-cart you want this for.


Hi Carrie,
My workflow is:
1. Make the Customer a registered user; I am now doing this the hard way (copy/paste each field)
2. Identify the customer userid in phpMyAdmin
3. Edit the order in phpMyAdmin - table: xcart_orders - set userid from 'empty' to the new userid of the newly registered customer.

One thing I am not sure about: Points history? Do we have to manually apply points for the retroactive order(s)? I'm guessing yes. That would be OK with me...

I think the "magic button" that is beyond my skillset is:

1. capture customer name/address/email and create a new registration, with default password 'password' and set "must change password at next login" to 'checked'

2. then, once customer is registered (back on the order page) -- assign the anon order to the newly registered customer.

I'm in 4.5.4

ADDISON 07-31-2013 06:21 AM

Re: Anonymous to registered customer conversion
 
4.5 and 4.6

connemara 08-02-2013 01:22 PM

Re: Anonymous to registered customer conversion
 
4.4.5

ramdial 08-02-2013 09:44 PM

Re: Anonymous to registered customer conversion
 
4.3.2

BCSE 08-08-2013 07:40 AM

Re: Anonymous to registered customer conversion
 
We almost have this ready, any good name ideas for the mod?

Carrie

carpeperdiem 08-08-2013 07:48 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by BCSE
We almost have this ready, any good name ideas for the mod?


How about: "BCSE fix for X-Cart anonymous customer defect"

LOL

I was speaking to a rep from a trade show yesterday, and somehow, I managed to let slip, "but your show is just a bunch of yentas with business cards..."

That didn't get me the results I was looking for. Let's try again...

"BCSE Register Anonymous Customer Mod"

?

Thomasb134 08-08-2013 08:12 AM

Re: Anonymous to registered customer conversion
 
Quote:

I need you guys to reply as to what versions of X-cart you want this for.
4.4.5
Quote:

We almost have this ready ...
Awesome. I hadn't seen this discussion until today so I apologize for my late feedback.

ADDISON 08-08-2013 08:19 AM

Re: Anonymous to registered customer conversion
 
I agree Carpeperdiem. Even we are joking, BCSE is fixing a defect inside X-Cart souce code. It is not a bug in code, it is a defect.

May I ask you when we will have another important defect fixed? A true Address Book! QT promised a fixed, then it was OK from their point of view (I did not share it). In 2013 I guess this should be fixed once and for all.

Off-topic: I started debugging Magento to create a website for a friend of mine. Normally I do not offer such of service, but for fun I can do it. Could you believe Magento has tons of features missing comparing with X-Cart? But some of the features are very powerful - Page, Blocks, Attributes, Extensions. Even the admin interface is nice looking. To join more people to your solution you have to take the best from the others having a smooth switch for all.

BCSE 08-08-2013 09:39 AM

Re: Anonymous to registered customer conversion
 
I think we're going with 'Anonymous Customer Registration' for the title. Thanks Jeremy for the suggestion, that helped us come up with the above. I'm still debating between yours and that one but I think the vote went for the above.

Carrie

BCSE 08-08-2013 10:28 AM

Re: Anonymous to registered customer conversion
 
Also it's going to be a good bit more difficult to do pre 4.4.x for this (because of X-cart restrictions on username). So if anyone is needing it for a version before 4.3.x contact us for a quote. We're going to make it free for 4.4.x through 4.6.x.

Thanks,

Carrie

ADDISON 08-08-2013 10:51 AM

Re: Anonymous to registered customer conversion
 
Good job Carrie.

This should be included by default in the next X-Cart v4 versions.

cherie 08-12-2013 04:13 PM

Re: Anonymous to registered customer conversion
 
Quote:

Anonymous Customer Registration
=D>

Quote:

more difficult to do pre 4.4
#-o

BCSE 08-13-2013 08:49 AM

Re: Anonymous to registered customer conversion
 
OK here it is! If you have more feature requests please do email us. We may consider making a paid version too if there are a lot of features requested. I just tested this out in 4.5.x before I released it and it's pretty simple, but cool!

http://www.bcsengineering.com/store/free-anonymous-customer-registration-for-x-cart.html?MMCF_xfUnAnonymizer

One bonus we never talked about is we have the option to associate old anonymous orders by the same email address to the new user that is created. I think that feature is a great feature to have that I don't think we discussed but it's in there!

Feel free to donate for it too if you like it. It did take more hours than we usually spend on a free mod.

Carrie

quietcoolone 08-13-2013 09:06 AM

Re: Anonymous to registered customer conversion
 
Since i made the original post, let me be the first to say THANK YOU.
I also purchased the CIM module you have on sale --- its a win win situation.

Thanks again Carrie

BCSE 08-13-2013 10:04 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by quietcoolone
Since i made the original post, let me be the first to say THANK YOU.
I also purchased the CIM module you have on sale --- its a win win situation.

Thanks again Carrie


Not a problem! Glad we could help!

It looks though like you got the DPM module, did you mean to get that one or the CIM?

Thanks,

Carrie

quietcoolone 08-13-2013 10:21 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by BCSE
Not a problem! Glad we could help!

It looks though like you got the DPM module, did you mean to get that one or the CIM?

Thanks,

Carrie


i don't store or wish to store customer credit card numbers and if that is the only major difference, then DPM will do. If i got this wrong please point me in the right direction.

BTW, The patch and installation was easy however i can't get the Free module to appears in general setting/modules nor the "create user" button in order details page. I have cleared templates etc but still no love


thanks.

BCSE 08-13-2013 11:28 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by quietcoolone
i don't store or wish to store customer credit card numbers and if that is the only major difference, then DPM will do. If i got this wrong please point me in the right direction.

BTW, The patch and installation was easy however i can't get the Free module to appears in general setting/modules nor the "create user" button in order details page. I have cleared templates etc but still no love


thanks.


DPM is what you need then.


For the patch, did you run cleanup.php to make sure X-cart clears it's internal cache? Also make sure the SQL patch applied. I'm not seeing it listed in your list of modules. It should be safe to run the sql patch again if you aren't sure.

Thanks,

Carrie

BCSE 08-13-2013 11:47 AM

Re: Anonymous to registered customer conversion
 
OK I see the module now in your modules area, have you enabled it? It looks disabled.
Quote:

3rd party modules
Enabled
XPDF
Disabled
BCSE_Unanonymizer


Once you do, you can go to an order that is an anonymous order and you should see that new button. If the order is not anonymous it won't show up.

Let us know!

Thanks,

Carrie

quietcoolone 08-13-2013 11:56 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by BCSE
OK I see the module now in your modules area, have you enabled it? It looks disabled.


Once you do, you can go to an order that is an anonymous order and you should see that new button. If the order is not anonymous it won't show up.

Let us know!

Thanks,

Carrie


Carrie,
success-- works like a charm!!
btw, how do you know what module i have installed? :)

BCSE 08-13-2013 12:01 PM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by quietcoolone
Carrie,
success-- works like a charm!!
btw, how do you know what module i have installed? :)



Um.... Many years of knowing X-cart (10+). :) If you want to email us I can show you. You should probably block a certain file, but really if someone wanted to figure out if you had X-cart or not it wouldn't be that hard. There's a file that lists the modules installed.

Carrie

BCSE 08-13-2013 12:03 PM

Re: Anonymous to registered customer conversion
 
Oh, and glad it's working great! Feel free to post a review on it on our site if you'd like, so others know.

Thanks,

Carrie

Dougrun 08-13-2013 12:56 PM

Re: Anonymous to registered customer conversion
 
FYI, that mod to order_history.php, the line is at the top of my 4.6 file, not the bottom as the install states.

same with the other file.

BCSE 08-14-2013 10:29 AM

Re: Anonymous to registered customer conversion
 
Quote:

Originally Posted by Dougrun
FYI, that mod to order_history.php, the line is at the top of my 4.6 file, not the bottom as the install states.

same with the other file.


Yes you're right, it should say towards the top of the file.

Thanks!

Carrie

quietcoolone 08-31-2013 02:14 PM

Re: Anonymous to registered customer conversion
 
I discovered today that this add-on does not work in xcart 4.4.5 if the customer has a "special character" in their names.
For example:
i tried to create a user who's last name is O'Shaughnessy. Xcart would display an error message and shortly after i received the following email:

SQL query : INSERT INTO xcart_customers (`login`, `username`, `password`, `change_password_date`, `usertype`, `change_password`, `activity`, `status`, `language`, `membershipid`, `cart`, `referer`, `last_login`, `first_login`, `firstname`, `lastname`, `email`) VALUES ('***@hotmail.com', '***@hotmail.com', 'B-70c2b68cb973733118d286d5c678d5a6', '1377986143', 'C', 'Y', 'Y', 'Y', 'en', '0', '', '', '1377986143', '1377986143', 'John Doe', 'O'Shaughnessy', '***@hotmail.com')
Error code : 1064
Description : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Shaughnessy', '***@hotmail.com')' at line 1
Request URI: /admin/order.php?orderid=300214&mode=bcse_create_user


Removing the special character allowed the user to be created

BCSE 09-03-2013 10:48 AM

Re: Anonymous to registered customer conversion
 
Thanks for the info on that! We'll update the mod and let you guys know when it's ready. Sounds like X-cart's fun_array2insert doesn't 'addslashes' and we need to clean the data before using that function.

Carrie

cherie 09-03-2013 12:28 PM

Re: Anonymous to registered customer conversion
 
This is how 4.6 does it in func_change_user_password if that helps:
PHP Code:

...
        
func_array2insert(
            
'old_passwords',
            array(
                
'userid'    => $xuserid,
                
'password'  => addslashes($_old_password),
            ),
            
true
        
); 



All times are GMT -8. The time now is 04:54 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.