New user registration - bypassing confirmation email
#1
Posted 06 May 2010 - 06:59 PM
I am wondering if it is possible to bypass the registration confirmation email for new users.
Essentially the first page/part of the order process would include getting details related a new user account, Name - email - password from which they go straight into their order. No confirmation email or logging in.
Is this possible?
the reason is I don't want customers to have to leave the shopping funnel whilst they are in the middle of an order.
#2
Posted 07 May 2010 - 11:46 PM
There is one issue with the approach you proposed. To log in (even in the background) a customer should be marked as registered in LemonStand. Also, there could be no multiple registered customers with a same email address. It means - if a customer ordered something on your website, he will not be able to order something else using the same email address, without logging in, because the system will not allow to create another registered customer with a specified email address.
What do you think about the following solution? When customer places his first order, the system sends him a confirmation email with email and password. Into the email message template you will add a note that the next time when the customer want to purchase items on your store, he must login using the email and password specified in the confirmation email message. Also the system automatically logs the customer in. When the customer pays the order, he is redirected to the order details page, with the download links.
Next time the customer will need to log in before placing an order, but he will be aware about the process from the previous experience.
What do you think?
Aleksey
#3
Posted 08 May 2010 - 01:43 AM
Where would the best place be to read up on the best way to approach this solution?
Thanks again!
Glyn
#4
Posted 08 May 2010 - 05:26 PM
This approach is not documented yet. :-) I will provide you with all necessary information here.
First, you need to add a hidden field register_customer to the last step of the checkout process. This page or partial contains the Pay button. If you use the default store checkout implementation, the partial name is shop:checkout_review. Add the following line above the Pay button:
<input type="hidden" name="register_customer" value="1"/>
This will force LemonStand to register customers after placing new orders. Also, we need to auto-login a new customer after placing an order. To login a new customer on new order, we need to process the shop:onNewOrder system event. To process events, a simple module needed. I created this module for you (find it attached). Unzip the archive to the /modules directory. I also published a minor API update, so please update your copy.
The module contains only a few lines of code. It handles the shop:onNewOrder event and executes the following code on each new order:
$order = Shop_Order::create()->find_by_id($order_id);
if ($order)
Phpr::$frontend_security->customerLogin($order->customer_id);
This code logs the new customer into the store in the background.
You will also need to develop the pages for logged-in customers - the order list and the order details (you can find necessary information in the Wiki - http://lemonstandapp...r_orders_page/, http://lemonstandapp...details_page/). And the last thing you need - when a customer pays an order, LemonStand automatically redirects him the receipt page. Instead of this, we will need to redirect him to the order details page (http://lemonstandapp...r_details_page/). It is a very simple operation, I will explain you how to do it when you are ready.
Thanks!
Aleksey
#5
Posted 08 May 2010 - 06:26 PM
I will go through this early this week and post results :)
Such prompt help, Thank you!
#6
Posted 09 May 2010 - 06:55 PM
Or will I need to sue the guest checkout ..
#7
Posted 09 May 2010 - 07:26 PM
This method should work anywhere. In any case it will be possible to update the core, if we face any issues :-)
Aleksey
#8
Posted 10 May 2010 - 04:25 AM
I have added the register_customer code to my Order Preview page
Installed the Module in a folder called motecustommodule
I have created two new pages /order (customer_orders_page) and /orders (order_details_page)
Now things seem to be happening, after selecting "Pay" an order (and when use an email that I have used before) it says that this email is already in use. I then enter an alternative email and it progresses fine. However I can't see the alternative email getting added to the system as a customer?
Also I get an email at this point notifying me of a successful order. I would have assumed this to come after a paypal payment has gone.
I also need to set the return page to /orde. I can see in Paypal that the return page is /ls_paypal_autoreturn - is this the one I change?
#9
Posted 10 May 2010 - 04:38 AM
#10
Posted 10 May 2010 - 04:44 AM
#11
Posted 10 May 2010 - 04:46 AM
After a successful payment I am now directed back to the /order page, it does say "order not found" but if I then select "my orders", the order is there.
I can then select that order and download the file.
So I now just have to sort out why the the order is not shown on the initial load.
#12
Posted 10 May 2010 - 02:00 PM
You already solved almost all tasks. Good job!
To return a customer to the Order page after the successful payment you need to update your receipt page. You should not change anything in the PayPal payment module code, of course. You should already have the receipt page in your store as it is installed by default. On the payment method configuration form (Shop/Payment Methods/Edit) you need to select the receipt page in the Receipt Page field (see the screenshot attached - receipt_page.png).
After that, you need to add two lines of code to the receipt page, in order to redirect a customer from the receipt page to the order page, in the background. Please add the following lines to the Pre Action Code field of the Edit Page form (for the receipt page):
if ($order)
Phpr::$response->redirect(root_url('/order/'.$order->id));The code assumes that your order details page has the /order URL. Change it if this is not so. I attached a screenshot - receipt_code.png
Aleksey
#13
Posted 10 May 2010 - 07:30 PM
I have attached a screenshot. Does this mean I am not passing the order number over from PayPal?
#15
Posted 10 May 2010 - 07:36 PM
Quote
Hmm... No, I don't think so. What is the URL of a page, which displays you the error? There should be an order number in the last segment of the URL. For example: http://mysite.com/th...u/1231313123123
Aleksey
#16
Posted 10 May 2010 - 07:40 PM
#18
Posted 27 August 2010 - 08:46 AM
#19
Posted 27 August 2010 - 04:41 PM
No, LemonStand will create a guest customer. It does not make assumptions based on the email address. If a customer wants to checkout under his account, he needs to log in. Until customer is authorized with his email and password, he is a guest. However, you can update the checkout process with a simple check - if a customer specifies an existing email on the Billing Information checkout step, you can disallow him to continue and ask him to log in. Let me know if you need help with this.
Thanks.
#20
Posted 01 September 2010 - 08:54 AM
This is working well, however, I never received the confirmation email telling me my (temporary) password. Shouldn't it have sent that out?
I'm wondering if there's a way to allow the user to choose a password in the checkout process somewhere?

Help














