News:

Support the VirtueMart project and become a member

Main Menu

Remove Login at PseudoRegistration link

Started by DaggaTora, June 06, 2012, 18:51:31 PM

Previous topic - Next topic

DaggaTora

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.
Joomla 2.5.17 | VM2.0.26d | PHP 5.3.28

FilipeRuivo

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   

FilipeRuivo

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.

lipes

#3
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!
VM V. online: J2.5.14 | VM 2.0.20a | SQL 5.1.70 | PHP 5.3.25