News:

Looking for documentation? Take a look on our wiki

Main Menu

VM2 Customer registration

Started by jamedia, January 11, 2012, 00:12:17 AM

Previous topic - Next topic

bogusj

Hi, any progress with, at the top of the shopping cart, there is the login without the new user registration link?

Milbo

#46
Quote from: pbc278 on June 15, 2012, 01:38:47 AM
Quote from: pbc278 on June 15, 2012, 01:31:16 AM
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 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

Hi,

Could anybody help me with this one, please?
Quote from: bogusj 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?

walkyrie

I have exactly the same question as bogusj...? Why should we click on "bill information" to have the registration fields???

thank's!

Remy

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

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

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

Anybody any help with this one???
Quote from: bogusj on July 11, 2012, 11:28:53 AM
Hi,

Could anybody help me with this one, please?
Quote from: bogusj 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?

bytelord

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

#53
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

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!