VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: raunhar on January 22, 2016, 06:33:43 AM

Title: Registration Form layout
Post by: raunhar on January 22, 2016, 06:33:43 AM
Joomla 3.4.8
VM: 3

http://pinkstory.in/index.php/component/virtuemart/user.html?Itemid=233

The register Button is at the top of the form, which is quiet awkward.

How can we show the buttons at the end of the form.
Title: Re: Registration Form layout
Post by: jenkinhill on January 22, 2016, 23:43:10 PM
The register button is at the bottom of the form........    But it is not a default VM template so see http://forum.virtuemart.net/index.php?topic=108212.0
Title: Re: Registration Form layout
Post by: raunhar on January 23, 2016, 06:04:35 AM
That was taken care of by the Template Developer, but he could not bring Captcha above the buttons.
Title: Re: Registration Form layout
Post by: Spiros Petrakis on January 24, 2016, 16:07:05 PM
Open edit_address.php file and find this code (if your template has overrides for this file it should be in templates\YOUR_TEMPLATE\html\com_virtuemart\user folder )


<?php renderControlButtons($this,$rview); ?>


now move it just before this code


<input type="hidden" name="option" value="com_virtuemart"/>
Title: Re: Registration Form layout
Post by: raunhar on January 25, 2016, 06:10:41 AM
Did the changes, but the captcha remained below the action buttons.
Title: Re: Registration Form layout
Post by: Spiros Petrakis on January 25, 2016, 09:03:51 AM
Sorry my fault, the files you need to modify are

1) edit.php - copy this code to use it in step two then  comment or remove it from edit.php


// captcha addition
if(VmConfig::get ('reg_captcha')){
JHTML::_('behavior.framework');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
?>
<div id="dynamic_recaptcha_1"></div>
<?php
}
// end of captcha addition


2) edit_shopper.php - i assume from your link that the buttons are already in the correct place so you need to add the above code just after this


if ($this->userDetails->JUser->get('id') ) {
  echo $this->loadTemplate('address_addshipto');
}
 

These changes will work if the template is using the standard vm3 view files but because it wont be easy to do the changes if you are not familiar with php and maybe you dont properly close the php tags  i have attached the modified files. 
Please first backup the original files before make any changes or replace them with the attached.