VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: DaggaTora on June 06, 2012, 18:51:31 PM

Title: Remove Login at PseudoRegistration link
Post by: DaggaTora on June 06, 2012, 18:51:31 PM
Hi,

As far as I know there is no proper registration link and if we want our clients to register through virtuemart form we have to "redirect" them to an adress like "index.php?option=com_virtuemart&view=user&task=editaddresscart". Am I right or there have been changes?

:) So...this have some problems, mostly stylish problems like a login form on top of the registration form, a title like "Edit your billing info" when you not even registered, etc.. Is there anyway to just keep the registration form in a link? or to hide the login and "edit billing..." but show it during checkout?

Thanks for your time.
Title: Re: Remove Login at PseudoRegistration link
Post by: FilipeRuivo on June 22, 2012, 10:48:20 AM
I try index.php?option=com_virtuemart&view=user
But problem is when I click the Register button this redirect to 500 error page and give me the fowling url

index.php?option=com_virtuemart&view=user&layout=default&Itemid=120

I notice that the user is registered and if I remove the "&layout=default" goes to a valid page   
Title: Re: Remove Login at PseudoRegistration link
Post by: FilipeRuivo on June 22, 2012, 11:00:49 AM
I change this code

/**
* This is the save function for the normal user edit.php layout.
* We use here directly the userModel store function, because this view is for registering also
* it redirects to the standard user view.
*
* @author Max Milbers
*/
function saveUser(){

$msg = $this->saveData(false,true);
$layout = JRequest::getWord('layout','edit');
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user&layout='.$layout), $msg );
}


to

/**
* This is the save function for the normal user edit.php layout.
* We use here directly the userModel store function, because this view is for registering also
* it redirects to the standard user view.
*
* @author Max Milbers
*/
function saveUser(){

$msg = $this->saveData(false,true);
$this->setRedirect( JRoute::_('index.php?option=com_virtuemart&view=user), $msg );
}


and now works fine.
Title: Re: Remove Login at PseudoRegistration link
Post by: lipes on July 31, 2012, 04:59:13 AM
Some problem here when i test it to create a new user in 2.0.8 E
it goes to the link:
index.php?option=com_virtuemart&view=user&layout=default

It give me a Joomla Error 500 with the mss: Layout "default" not found

I've changed the File
\Ampps\www\Teste2\components\com_virtuemart\controllers\user.php
in every line like the User FilipeRuivo said &layout='.$layout   ... this is not necessary (for now?!)  ....
I test again creating a new user ... and works Fine now!