Change display of switcher method

  • Posts: 25
  • Thank you received: 2
11 years 7 months ago #127889

-- url of the page with the problem -- : www.infinitygadgets.com
-- HikaShop version -- : Latest version
-- Joomla version -- : 3.1
-- PHP version -- : 5.3

I wish to achieve the following:
When you have the checkout in switcher mode, I would like it so the default display is 'guest' with the option to choose 'register' or 'login'.
BUT when you choose the various options it only displays the needed infomation, so if you select 'login' ONLY the login form displays, or if you chose 'guest' only the email and address section is displayed.

I would also like to change the heading on the guest module from'address information' to 'biling address'

Many thanks

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #127948

Hi,

Your problem is coming from a CSS issue, using this CSS code will probably do the job :

.hikashop_hidden_checkout{
  display:none;
}

The following user(s) said Thank You: mgainey

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

  • Posts: 25
  • Thank you received: 2
11 years 7 months ago #127976

Many thanks for your quick reply.
I can't find where to change the login preference text from identification to something else? I would also like to have the page be on guest as default, how would I do this?

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

  • Posts: 12953
  • Thank you received: 1778
11 years 7 months ago #128005

1. You'll probably be able to change it by editing your translation file
2. If you want "guest" to be the default value you'll have to edit the login file of your checkout view of your front-end template through "Hikashop->Display->Views" :

  if($display_login){ $defaultSelection = 'login'; }
By :
  if($display_login){ $defaultSelection = '2'; }

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

  • Posts: 25
  • Thank you received: 2
11 years 7 months ago #128050

<?php
/**
* @package HikaShop for Joomla!
* @version 2.2.2
* @author hikashop.com
* @copyright (C) 2010-2013 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?><?php
if(!$this->identified){
$this->nextButton = false;
$params = null; $js = null;
$classLogin = "hikashop_hidden_checkout";
$classRegistration = "";
$defaultSelection = '2';
$span='';

$display_login = $this->config->get('display_login',1);

$sr = explode(',', $this->simplified_registration);
$this->registration = array(0=>false,1=>false,2=>false,3=>false);
foreach($sr as $r) {
$this->registration[ (int)$r ] = true;
}
$registration_count = count($sr);

if($display_login){
$classLogin = '';
$classRegistration = 'hikashop_hidden_checkout';
$defaultSelection = 'login'; <<<<<<<<<<<<<<<< I changed this to 2 with no effect, did I do this right, am i in the right place?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #128117

Hi,

You have to add this line:

$defaultSelection = '2';
Before:
echo JHTML::_('select.radiolist',  $values, 'data[register][registration_method]', ' onchange="displayRegistration(this)"', 'value', 'text', $defaultSelection, false, false, true );

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

  • Posts: 25
  • Thank you received: 2
11 years 7 months ago #128131

Thanks for your reply,
I added the code as shown and whne checking out the radio button was on 'Guest' but the login module was displayed and not the guest details section, as the shop is currently live I have removed the code to sotp confusion.

Any ides on how to rectify this?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #128198

At the end of the view, thanks to add the following code:

<script type="text/javascript">
	var guest = {
				value:  '2',
				checked: '1'
			};
	displayRegistration(guest);
</script>

The following user(s) said Thank You: mgainey

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

  • Posts: 22
  • Thank you received: 1
  • Hikashop Business
11 years 7 months ago #129438

I have followed the info on this thread and all is now good except I wanted to change the 'Register' button to say 'Confirm' for guest users but I can't find where/how to do this?

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

  • Posts: 13201
  • Thank you received: 2322
11 years 7 months ago #129498

Hi,

You have to make a translation override, here is the documentation:
www.hikashop.com/support/faq.html#tran

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

Time to create page: 0.100 seconds
Powered by Kunena Forum