[SOLVED] Where to change this view!

  • Posts: 32
  • Thank you received: 1
11 years 9 months ago #118083

-- url of the page with the problem -- : Not allowed to give!
-- HikaShop version -- : 2.2.0
-- Joomla version -- : 3.1.5
-- PHP version -- : 5.4.16
-- Browser(s) name and version -- : ALL BROWSERS

Dear brilliant minds of Hikashop and all of it members,

I cant find a view in Hikashop! When I go to the following view:

Joomla Backend -> Hikashop Component -> Display -> Views -> User -> registration_bootstrap.php

In this file there is the following code:

<div class=""><legend><h4><?php echo JText::_( 'ADDRESS_INFORMATION' ); ?></h4></legend></div>
<?php
  $this->type = 'address';
  echo $this->loadTemplate();
?>

  <div class="control-group hikashop_registration_required_info_line">
    <div class="controls"><?php echo JText::_( 'HIKA_REGISTER_REQUIRED' ); ?></div>
  </div>
  <input type="hidden" name="data[register][id]" value="<?php echo (int)$this->mainUser->get( 'id' );?>" />
  <input type="hidden" name="data[register][gid]" value="<?php echo (int)$this->mainUser->get( 'gid' );?>" />
<?php
  $additional_check='';
  if(empty($this->form_name)){
    $this->form_name = 'hikashop_checkout_form';
    if(JRequest::getVar('hikashop_check_order')) $additional_check='&& hikashopCheckChangeForm(\'order\',\''.$this->form_name.'\')';
  }
?>
  <div class="control-group">
      <div class="controls">
      <?php echo $this->cartClass->displayButton(JText::_('HIKA_REGISTER'),'register',$this->params,'','if(hikashopCheckChangeForm(\'register\',\''.$this->form_name.'\') && hikashopCheckChangeForm(\'user\',\''.$this->form_name.'\') && hikashopCheckChangeForm(\'address\',\''.$this->form_name.'\')'.$additional_check.'){ var button = document.getElementById(\'login_view_action\'); if(button) button.value=\'register\'; document.'.$this->form_name.'.submit();} return false;', '', 0, 1, 'btn btn-primary'); ?>
    </div>
  </div>

I believe that in the code above it says which view it loads but i cant find it. What i want to achieve is to split the address details in 2 columns. Right now it is one very long column. I cannot make these changes in this file 'registration_bootstrap.php' therefore I need to change another view but I cant find that view.

Thanks for any push in the right direction.

PS: (Forum Operator)I have put this in the category Checkout I wasn't quite sure where to put it.

Last edit: 10 years 10 months ago by loginsecure.

Please Log in or Create an account to join the conversation.

  • Posts: 83927
  • Thank you received: 13584
  • MODERATOR
11 years 9 months ago #118090

Hi,

It's the file custom_fields_bootstrap that you want to edit.

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
11 years 9 months ago #118092

Thank you for your answer Nicolas. As always very quick.

The file you are talking about is as the code below:

<?php
/**
 * @package  HikaShop for Joomla!
 * @version  2.2.0
 * @author  hikashop.com
 * @copyright  (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
 * @license  GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
 */
defined('_JEXEC') or die('Restricted access');
?><?php
$type = $this->type;
foreach($this->extraFields[$type] as $fieldName => $oneExtraField) {
?>
  <div class="control-group hikashop_registration_<?php echo $fieldName;?>_line" id="hikashop_<?php echo $type.'_'.$oneExtraField->field_namekey; ?>">
    <div class="control-label">
      <?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
    </div>
    <div class="controls">
<?php
  $onWhat='onchange'; if($oneExtraField->field_type=='radio') $onWhat='onclick';
  echo $this->fieldsClass->display(
      $oneExtraField,
      @$this->$type->$fieldName, 
      'data['.$type.']['.$fieldName.']',
      false,
      ' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"',
      false,
      $this->extraFields[$type],
      $this->$type
  );
?>
    </div>
  </div>
<?php }  ?>

But I dont see how this works!

I have now:

Titel
Firstname
Lastname
Street
Postalcode
City
State
Country
REGISTERBUTTON

What I want is this:
TitelPostalcode
FirstnameCity
LastnameState
StreetCountry
REGISTERBUTTON

I dont see a way to create this in the file: custom_fields_bootstrap.php

Thank you.

Please Log in or Create an account to join the conversation.

  • Posts: 83927
  • Thank you received: 13584
  • MODERATOR
11 years 9 months ago #118125

Hi,

You can use such code for example :

<table>
<?php
$type = $this->type;
$first = true;
foreach($this->extraFields[$type] as $fieldName => $oneExtraField) {
	if($first) echo '<tr>';
?>
<td>
	<div class="control-group hikashop_registration_<?php echo $fieldName;?>_line" id="hikashop_<?php echo $type.'_'.$oneExtraField->field_namekey; ?>">
		<div class="control-label">
			<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
		</div>
		<div class="controls">
<?php
	$onWhat='onchange'; if($oneExtraField->field_type=='radio') $onWhat='onclick';
	echo $this->fieldsClass->display(
			$oneExtraField,
			@$this->$type->$fieldName,
			'data['.$type.']['.$fieldName.']',
			false,
			' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$type.'\',0);"',
			false,
			$this->extraFields[$type],
			$this->$type
	);
?>

		</div>
	</div>
</td>
<?php if(!$first) echo '</tr>';
$first = false;
}	?>
<table>

Please Log in or Create an account to join the conversation.

  • Posts: 32
  • Thank you received: 1
10 years 10 months ago #165915

Okey thank you very much. I did on that project something different but I will try it on my next journey.

Please Log in or Create an account to join the conversation.

Time to create page: 0.062 seconds
Powered by Kunena Forum