Author Topic: VM2 Customer registration  (Read 48518 times)

bogusj

  • Jr. Member
  • **
  • Posts: 62
Re: VM2 Customer registration
« Reply #45 on: June 29, 2012, 13:18:40 PM »
Hi, any progress with, at the top of the shopping cart, there is the login without the new user registration link?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 10626
  • VM4.0.232 Eagle Owl
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 4 on joomla 3
Re: VM2 Customer registration
« Reply #46 on: June 30, 2012, 12:39:43 PM »
then you can see the return of this part sould be the login action, but the line '$return = $mainframe->login($credentials);' does not do anything, change it also to:

This part was correct, sorry, did not know do a 'return' this way...
I was learned to write "return bla bla bla;" and not "$return = bla bla bla;"

sorry  :-[

No reason to say sorry man. I see it exactly as you, I also do not like it. I am sorry that I see this 1 day after the release, hmp. Next time pook me on it (just btw, yes it is poke, but pook is my new word for a mix of poke and push).

Very interesting this change with the id==0 and it should be !=0, why not just completly remove it then?

Edit: I just see that in the new version 2.0.8 we use
Code: [Select]
if($currentUser->guest==1){
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

bogusj

  • Jr. Member
  • **
  • Posts: 62
Re: VM2 Customer registration
« Reply #47 on: July 11, 2012, 11:28:53 AM »
Hi,

Could anybody help me with this one, please?
Hi, any progress with, at the top of the shopping cart, there is the login without the new user registration link?

walkyrie

  • Beginner
  • *
  • Posts: 16
Re: VM2 Customer registration
« Reply #48 on: August 15, 2012, 17:27:06 PM »
I have exactly the same question as bogusj...? Why should we click on "bill information" to have the registration fields???

thank's!

Remy

  • Beginner
  • *
  • Posts: 8
Re: VM2 Customer registration
« Reply #49 on: August 28, 2012, 15:55:16 PM »
Hello,

I found out that this "bug" has been in VM 2 since version 2.0.2 so I created my own hack, I'm sure it's not the best solution but it works for me.

In the file: components\com_virtuemart\controllers\user.php
Go find the code:
Code: [Select]
function registerCheckoutUser(){
$msg = $this->saveData(true,true);
$this->setRedirect(JRoute::_( 'index.php?option=com_virtuemart&view=cart&task=checkout',$this->useXHTML,$this->useSSL ),$msg);
}

And change it to:

Code: [Select]
function registerCheckoutUser(){
$msg = $this->saveData(true,true);
$currentUser = JFactory::getUser();
if($currentUser->id != 0){
$this->setRedirect(JRoute::_( 'index.php?option=com_virtuemart&view=cart&task=checkout',$this->useXHTML,$this->useSSL ),$msg);
} else {
$this->setRedirect(JRoute::_( 'index.php?option=com_virtuemart&view=user&task=editaddresscheckout&addrtype=BT',$this->useXHTML,$this->useSSL ),$msg);
}
}

I don't know if it will work with an activation link send via mail but it works if you have a 'register as customer' button next to the 'register as guest' button.

Hope this "bug" will get fixed with the next update because I don't like changing core files of components

cavalier79

  • Beginner
  • *
  • Posts: 6
Re: VM2 Customer registration
« Reply #50 on: October 03, 2012, 16:06:40 PM »
Hello all! I think i've found why the activation link doesn't work.

When the user register trough VM it creates the user on #__users. But when VM check if the user is correctly registered ($app->login() ) it update the #__users login with lastVisitDate.

the activate() function on register.php model on com_users search for the activation code but also with a lastvisitdate set to null and so it says that the code is incorrect.

I made a workaround modifying the query in the register model, but i would that vm don't do that login or update the lastvisitdate.

thanks and sorry for my bad english!

bogusj

  • Jr. Member
  • **
  • Posts: 62
Re: VM2 Customer registration
« Reply #51 on: October 07, 2012, 15:42:43 PM »
Anybody any help with this one???
Hi,

Could anybody help me with this one, please?
Hi, any progress with, at the top of the shopping cart, there is the login without the new user registration link?

bytelord

  • Nikos
  • Global Moderator
  • Full Member
  • *
  • Posts: 2369
Re: VM2 Customer registration
« Reply #52 on: October 07, 2012, 16:45:11 PM »
Hello,

Could you please read the following thread: http://forum.virtuemart.net/index.php?topic=99755.0

Regards
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!

bogusj

  • Jr. Member
  • **
  • Posts: 62
Re: VM2 Customer registration
« Reply #53 on: November 23, 2012, 10:48:14 AM »
I have read the suggested thread, but I don't see a final fix by the VM programmers, or any confirmation that any of the suggestions work. Also the topic talks about the activation link. My problem is that in cart page there is no registration link, only the login. Any fix about this, please?

bogusj

  • Jr. Member
  • **
  • Posts: 62
Re: VM2 Customer registration
« Reply #54 on: November 23, 2012, 11:40:53 AM »
I found the problem!
For some reason, the block of code was commented out? I don't know why!
Line 140 of file components/com_virtuemart/views/user/tmpl/login.php was:
        <?php /*
          $usersConfig = &JComponentHelper::getParams( 'com_users' );
          if ($usersConfig->get('allowUserRegistration')) { ?>
          <div class="width30 floatleft">
          <a  class="details" href="<?php echo JRoute::_( 'index.php?option=com_virtuemart&view=user' ); ?>">
          <?php echo JText::_('COM_VIRTUEMART_ORDER_REGISTER'); ?></a>
          </div>
          <?php }
         */ ?>

I changed to:
        <?php
          $usersConfig = &JComponentHelper::getParams( 'com_users' );
          if ($usersConfig->get('allowUserRegistration')) { ?>
          <div class="width30 floatleft">
          <a  class="details" href="<?php echo JRoute::_( 'index.php?option=com_virtuemart&view=user' ); ?>">
          <?php echo JText::_('COM_VIRTUEMART_ORDER_REGISTER'); ?></a>
          </div>
          <?php }
          ?>

Problem solved!