VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Customer / User Management VM 1.1 => Topic started by: theblake on April 30, 2012, 09:36:38 am

Title: Modify the Register button in the login module
Post by: theblake on April 30, 2012, 09:36:38 am
Note: This question is not about the Send Registration button on the registration form.

We use Virtuemart for login and user registration, immediately underneath the Username and Password box is a link "Registration" that goes to the registration form.

I really would like to modify this button so that it links to an article on my website, rather than the registration form.  How may I do this?

I have two types of customer,  one who will register online normally,  and the other type I must set up manually (long story).  So I would like to have an explanatory page with the two options.
Using Virtuemart 1.1.4 on Joomla 1.5.16.
Title: Re: Modify the Register button in the login module
Post by: theblake on August 17, 2012, 07:58:10 am
The file to modify is

Look for this line and change it to your hearts content.
Code: [Select]
// Registration URL
$registration_url = $sess->url( SECUREURL.'index.php?option=com_virtuemart&page=shop.registration' );

However that did not work for me, another suffix was added automatically to the end of the URL  "&option=com_virtuemart&Itemid=1" thus redirecting the link to a different page.  my Virtuemart has been heavily modified,  so I dont know whether this is result of that or will happen to everyone.

So instead, I modified the actual URL by removing the PHP variable
Code: [Select]
<a href="<?php echo $registration_url ?>"><span class="login_title">REGISTER</span>
and replacing directly with the URL I wanted
Code: [Select]
<a href="index.php?option=com_content&view=article&id=95"><span class="login_title">REGISTER</span>
Finally got this modification done, I have been scratching my head for 2 years. My excuse is I havent a clue about anything PHP !
Hope this helps someone else one day.