News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

[solved]Registration/Activation problem and Checkout Process

Started by pixeldraft, June 15, 2012, 14:34:09 PM

Previous topic - Next topic

pixeldraft

Hello together!

I got some problems with my Joomla 2.5.4 and VirtueMart 2.0.6.

The URL is: http://shop.bigger-hardware.de/

So, my first problem is:
When I register over the login module at the top of the page everything is fine. I get an email with the activation link like http://shop.bigger-hardware.de/index.php?option=com_users&task=registration.activate&token=12345678901234567890123456789012. I click the link, the account is activated and enabled. I could go shopping.
But, when I put some products into the cart, then go to the checkout (the process is kind of complicated like hell, but I will ask that stuff later) and register, i get an e-mail with a link like http://shop.bigger-hardware.de/index.php?option=com_users&task=registration.activate&token=12345678901234567890123456789012. But when I click that link, it doesn't activate or enable the account. After registration ober the checkout, I am already loggedin and can finish the process. When I logout, I can't login, because the account is not activated and enabled, but I can't, because something is wrong with that link.

The next problem:
How can I change the steps in the checkout process. It's now like:
I am logged in. I put products in the cart. I go to the cart. Click "Check out". I have to choose the paying method. I get to the cart. I click "Check out". I have to choose the shipping method. I get to the cart. I click "Check out". I get to the cart, because I havn't checked the Terms and Conditions (but I don't know that I have to, because there's no notice that I have to). I check the Terms and Conditions. Click "Check out". Process is done.
But how can I change it to:
Login. Products in the cart. Go to the cart. Click "Check out". Choose payment method. Choose shipping method. One last overview. "Check out". Done. ?

I hope you guys can help me out.
I would appreciate it.

Best regards,
Heiko Holland

webgeral

I am dealing with the same issue for hours,

1 - It is impossible to register on this software , when i got to the registration page ...
2 - Major conflit with VM Paypal gateway , it does not show up.
3 - Impossivle to select the payment gatway  and shipping

Obs: I am almost to gave up it ...and go back to the old virtuemart version v1.9

CheezyPuffs

I'm with you on the check out steps, I have never seen a cart like this. It can be rather confusing or annoying to customers to keep getting sent back to the cart after each step. The only way I see to combat that is to select auto payment and shipping option but that only works if you only use one selection for both.

I would also like to know if there is a better way to change the checkout steps to where it just goes through them instead of sending you back each time.

This problem alone is making me think about using something else instead of virtuemart.

John2400


webgeral

Hello,

Sorry guys , i found the solution on my request on this forum.
The template was disabled new registration in joomla 2.5. this is why i cound not make any new registration on virtuemat 2.0
so I loged on joomla dashboard, click the user manager , and click on options , and set the alow user registration to YES, and saved and closed

lonelyfugitive

The problem is Joomla thinks the user is logged in when it tries to activate, and therefore skips activation and sends you to the index. For some reason, somewhere along the line of the checkout process, Virtuemart "half" logs the user in, either by using a Joomla function or creating session data that conflicts with Joomla's internal workings.

Essentially, I have not solved the problem in Virtuemart, since I find the code horrible to traverse. Instead I've made a small modification to Joomla itself that isn't very intrusive. Modify the activation link (e.g. &forceActivate=true ). You can do this inside administrator/components/com_virtuemart/models/user.php (sendRegistrationEmail).

Edit the following file components/com_users/controllers/registration.php to skip the initial redirect to index if that parameter is found in the request. The script will proceed with activating the user, regardless of whether they are logged in.



public function activate()
{
$user = JFactory::getUser();
$uParams = JComponentHelper::getParams('com_users');
$jreq = JRequest :: get();

// If the user is logged in, return them back to the homepage.
if ( $user->get('id') ) {
if( !isset($jreq['forceActivate'] )){
$this->setRedirect('index.php');
return true;
}
}

}

johnpetrucci

Scuse me, but in  administrator/components/com_virtuemart/models/user.php what should I change?

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

Quote from: CheezyPuffs on June 18, 2012, 03:28:13 AM
I'm with you on the check out steps, I have never seen a cart like this. It can be rather confusing or annoying to customers to keep getting sent back to the cart after each step ...

I would also like to know if there is a better way to change the checkout steps to where it just goes through them instead of sending you back each time.

This was an error which happened due SEF and should be fixed maybe already in 2.0.6, but at least 2.0.8, I am quite sure about this. I consider the described behaviour as really serious bug. It should go directly through the cart in one run.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

CMYKreative

Reading through some of the other threads, it seems there is an issue with the activation link itself. By adding www into it, it works fine.

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

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gaye2

Quote from: lonelyfugitive on July 10, 2012, 15:04:19 PM
The problem is Joomla thinks the user is logged in when it tries to activate, and therefore skips activation and sends you to the index. For some reason, somewhere along the line of the checkout process, Virtuemart "half" logs the user in, either by using a Joomla function or creating session data that conflicts with Joomla's internal workings.

Essentially, I have not solved the problem in Virtuemart, since I find the code horrible to traverse. Instead I've made a small modification to Joomla itself that isn't very intrusive. Modify the activation link (e.g. &forceActivate=true ). You can do this inside administrator/components/com_virtuemart/models/user.php (sendRegistrationEmail).

Edit the following file components/com_users/controllers/registration.php to skip the initial redirect to index if that parameter is found in the request. The script will proceed with activating the user, regardless of whether they are logged in.



public function activate()
{
$user = JFactory::getUser();
$uParams = JComponentHelper::getParams('com_users');
$jreq = JRequest :: get();

// If the user is logged in, return them back to the homepage.
if ( $user->get('id') ) {
if( !isset($jreq['forceActivate'] )){
$this->setRedirect('index.php');
return true;
}
}

}


I am new to joomla, so even before trying I wanted to ask...

Since the problem is Joomla thinks the user is logged in when it tries to activate... What if on components/com_users/controllers/registration.php instead of redirecting to index...


public function activate()
{
$user = JFactory::getUser();
$uParams = JComponentHelper::getParams('com_users');

// If the user is logged in, return them back to the homepage.
if ($user->get('id')) {
$this->setRedirect('index.php');
return true;
}


... If we destroy the session with the below code... So that user can login again after he or she clicked the activation link...



if ($user->get('id')) {
$session =& JFactory::getSession();
$session->destroy();
}



Would it work?

paping

for 2 weeks of tweaking this problem atlast i got the solution  ;)

bytelord

@paping post it. Share with others your solution.
Production: Joomla 2.5.8 | VM 2.0.14 | PHP 5.3.13
Testing     : Joomla 2.5.8 | VM 2.0.16 | PHP 5.3.8
Testing     : Joomla 2.5.8 |    VM 2.1   | PHP 5.3.8

- Don't Forget to mark thread as solved when it is solved!
- Please do not PM with support questions, use the forum!

maxboy

Quote from: paping on October 10, 2012, 10:47:13 AM
for 2 weeks of tweaking this problem atlast i got the solution  ;)

@paping you are all over the forum saying you have a solution, why don't you share it?
or do you want to sell it? on another forum you ask people to send you a PM to get the solution, just tell how much you charge...
thanks,