- Posts: 1195
- Thank you received: 13
Add radio button to switcher checkout
10 years 4 months ago #244936
by verzevoul
Add radio button to switcher checkout was created by verzevoul
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.4
Hello,
in checkout / login.php file i have added a div called "guest" with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the "guest" button also a radio button?
Thank you in advance
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.4
Hello,
in checkout / login.php file i have added a div called "guest" with a link to a custom page. There are the 2 radio buttons above that (login-register), can i make the "guest" button also a radio button?
Thank you in advance
Please Log in or Create an account to join the conversation.
10 years 4 months ago #244942
by nicolas
Replied by nicolas on topic Add radio button to switcher checkout
Hi,
Yes. Make sure that the input radio of your choice has the name
so that it is in the same group as the other ones. And add an onchange attribute to it with your javascript code to hide/display your div.
Yes. Make sure that the input radio of your choice has the name
Code:
data[register][registration_method]
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
10 years 4 months ago #244991
by verzevoul
Replied by verzevoul on topic Add radio button to switcher checkout
nicolas hi,
I m a bit low on javascript so if you could tell me how to do that i would really aprecciate it!
I will send you admin via email if you may please take a look.
Thank you!
I m a bit low on javascript so if you could tell me how to do that i would really aprecciate it!
I will send you admin via email if you may please take a look.
Thank you!
Please Log in or Create an account to join the conversation.
10 years 4 months ago - 10 years 4 months ago #245015
by Philip
Replied by Philip on topic Add radio button to switcher checkout
Hello,
You have to use "onclick" with some parameters in order to redirect when your customer click on the Guest checkbox.
Try to use this code IN <fieldset class="input"> like this :
And of course, remove this line :
<div class="crisregister"><a href="index.php?option=com_fabrik&view=form&formid=1&Itemid=305">Guest</a></div>
Hope this will fit your needs.
Regards
You have to use "onclick" with some parameters in order to redirect when your customer click on the Guest checkbox.
Try to use this code IN <fieldset class="input"> like this :
Code:
...
$doc->addScriptDeclaration("\n<!--\n".$js."\n//-->\n");
echo JHTML::_('hikaselect.radiolist', $values, 'data[register][registration_method]', ' onchange="displayRegistration(this)"', 'value', 'text', $defaultSelection, false, false, true );
?>
<div class="crisregister">
<input class="crisregister" type="radio" name="data[register][registration_method]" id="data[register][registration_method]0" value="0" onclick="window.location.href='index.php?option=com_fabrik&view=form&formid=1&Itemid=305'"/>Guest
</div>
</fieldset>
...
And of course, remove this line :
<div class="crisregister"><a href="index.php?option=com_fabrik&view=form&formid=1&Itemid=305">Guest</a></div>
Hope this will fit your needs.
Regards
Last edit: 10 years 4 months ago by Philip.
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
10 years 4 months ago #245071
by verzevoul
Replied by verzevoul on topic Add radio button to switcher checkout
Hello Philip,
thanks that's great! One more thing if possible, could the guest button display the form in the checkout page like login and regigister, instead of redirecting to another page?
Thank you
thanks that's great! One more thing if possible, could the guest button display the form in the checkout page like login and regigister, instead of redirecting to another page?
Thank you
Please Log in or Create an account to join the conversation.
10 years 4 months ago - 10 years 4 months ago #245073
by Philip
Replied by Philip on topic Add radio button to switcher checkout
Hello,
This is possible thanks to Javascript but that require some developer skills, ton use some radio button to leads to display or not.
See this example, here .
And you have the Javascript documentation reference, here .
If this is a little too much for you you can contact some developer, here on our Partner page .
Regards
This is possible thanks to Javascript but that require some developer skills, ton use some radio button to leads to display or not.
See this example, here .
And you have the Javascript documentation reference, here .
If this is a little too much for you you can contact some developer, here on our Partner page .
Regards
Last edit: 10 years 4 months ago by Philip.
The following user(s) said Thank You: verzevoul
Please Log in or Create an account to join the conversation.
Time to create page: 0.090 seconds