Author Topic: [solved]Registration/Activation problem and Checkout Process  (Read 36653 times)

pixeldraft

  • Beginner
  • *
  • Posts: 1
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

  • Beginner
  • *
  • Posts: 5
    • Webgeral
Re: Registration/Activation problem and Checkout Process
« Reply #1 on: June 17, 2012, 22:48:55 pm »
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

  • Beginner
  • *
  • Posts: 8
Re: Registration/Activation problem and Checkout Process
« Reply #2 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. 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

  • Virtuemart - the Future is ever Changing
  • Global Moderator
  • Full Member
  • *
  • Posts: 1568
  • VirtueMart Version: Use VM3.0.12

webgeral

  • Beginner
  • *
  • Posts: 5
    • Webgeral
Re: Registration/Activation problem and Checkout Process
« Reply #4 on: June 18, 2012, 12:21:05 pm »
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

  • Beginner
  • *
  • Posts: 1
Re: Registration/Activation problem and Checkout Process
« Reply #5 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.

Code: [Select]

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

  • Beginner
  • *
  • Posts: 11
Re: Registration/Activation problem and Checkout Process
« Reply #6 on: August 09, 2012, 14:25:04 pm »
Scuse me, but in  administrator/components/com_virtuemart/models/user.php what should I change?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Registration/Activation problem and Checkout Process
« Reply #7 on: August 12, 2012, 02:32:26 am »
Did you also checked out this thread? https://forum.virtuemart.net/index.php?topic=99755.0
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Registration/Activation problem and Checkout Process
« Reply #8 on: August 12, 2012, 02:34:25 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.
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

CMYKreative

  • Jr. Member
  • **
  • Posts: 71
    • CMYKreative - Bangkok-based Advertising, Marketing, Graphic Design, Website Design & Development, Brand Identity, Logo Design, Search Engine Optimization (SEO), Hosting, Programming, Photography and Powerpoint Presentations from Bangkok, Thailand
Re: Registration/Activation problem and Checkout Process
« Reply #9 on: September 07, 2012, 03:34:38 am »
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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

gaye2

  • Beginner
  • *
  • Posts: 3
Re: Registration/Activation problem and Checkout Process
« Reply #11 on: October 09, 2012, 17:01:42 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.

Code: [Select]

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...

Code: [Select]
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...

Code: [Select]

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


Would it work?

paping

  • Beginner
  • *
  • Posts: 6
Re: Registration/Activation problem and Checkout Process
« Reply #12 on: October 10, 2012, 10:47:13 am »
for 2 weeks of tweaking this problem atlast i got the solution  ;)

bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: Registration/Activation problem and Checkout Process
« Reply #13 on: October 10, 2012, 12:27:28 pm »
@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

  • Beginner
  • *
  • Posts: 12
Re: Registration/Activation problem and Checkout Process
« Reply #14 on: October 13, 2012, 06:05:19 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,