and I've added some products in cart... at check out time...according to validation... it redirect to login page....coz i'm not registered user ...but at same time cart is not empty...and it display my number of product...
Now I'm registered user coz i've registered my account ....and after registration my cart will empty..... So how can i get my product back into cart....???
What should i do...???? should i repeat same process as registered user and then check out.....??? should i search those products again...????
it should redirect to cart page.....and then i will be able to check out....
I'm using Nop 2.30 and I don't have that problem. I put items in cart, checkout, redirects to login, I click register, complete form, see "Your registration completed", and still have items in shopping cart and can hit checkout btn.
I have the version 2.30 - The member choose a variant and add it into his cart => the cart appears - the member accept condition and click on checkout => the login/register page appears - i click register => the register form appears - i fill the form and valid => an information page appear : THEN MY CART IS EMPTY
- i go to my email client and click on the token link => i go back to the site and see that my cart is empty
---- This process can be checked on the production server : http://www.rueduscooter.com
I found the problem but i do not know how to solve it :
After the registration, the user is redirected to RegisterResult. The WorkContext is initialised and the Customer is retrieved from the customercookie in WebWorkContext.cs:GetCurrentCustomer().
BUT the customer is not considered has registered (becaused it it not active) and a guest cutsomer is created:
var customerByCookie = _customerService.GetCustomerByGuid(customerGuid); if (customerByCookie != null && !customerByCookie.IsRegistered() && !customerByCookie.IsSearchEngineAccount()) customer = customerByCookie;
I think it should be:
var customerByCookie = _customerService.GetCustomerByGuid(customerGuid); if (customerByCookie != null && !customerByCookie.IsRegistered(false) && !customerByCookie.IsSearchEngineAccount()) customer = customerByCookie;
the truth is out there. In fact the AccountActivation() do not autologin the customer, so a Guest Customer is created with an empty cart. But if the customer logs in after Activation, the cart reappears.
BUT for the customer is very strange : i have a cart, i validate my account, my cart is empty i do not want to restart my shopping, i go away OTHER scenario i have a cart, i validate my account, i am autologged in, my cart is not empty, i am happy and i paid
this what i believed (perhaps the token must be destroy because if i lost it, someone can autologin)