- Posts: 25
- Thank you received: 2
Change display of switcher method
13 years 1 month ago #127889
by mgainey
Change display of switcher method was created by mgainey
-- 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
-- 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.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 1 month ago #127948
by Mohamed Thelji
Replied by Mohamed Thelji on topic Change display of switcher method
The following user(s) said Thank You: mgainey
Please Log in or Create an account to join the conversation.
13 years 1 month ago #127976
by mgainey
Replied by mgainey on topic Change display of switcher method
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?
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.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 1 month ago #128005
by Mohamed Thelji
Replied by Mohamed Thelji on topic Change display of switcher method
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" :
By :
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" :
Code:
if($display_login){ $defaultSelection = 'login'; }
Code:
if($display_login){ $defaultSelection = '2'; }
Please Log in or Create an account to join the conversation.
13 years 1 month ago #128050
by mgainey
Replied by mgainey on topic Change display of switcher method
<?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?
/**
* @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.
13 years 1 month ago #128117
by Xavier
Replied by Xavier on topic Change display of switcher method
Hi,
You have to add this line:
Before:
You have to add this line:
Code:
$defaultSelection = '2';
Code:
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.
13 years 1 month ago #128131
by mgainey
Replied by mgainey on topic Change display of switcher method
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?
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.
13 years 1 month ago #128198
by Xavier
Replied by Xavier on topic Change display of switcher method
At the end of the view, thanks to add the following code:
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.
13 years 1 month ago #129438
by jarinz
Replied by jarinz on topic Change display of switcher method
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.
13 years 1 month ago #129498
by Xavier
Replied by Xavier on topic Change display of switcher method
Hi,
You have to make a translation override, here is the documentation:
www.hikashop.com/support/faq.html#tran
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.087 seconds