- Posts: 75
- Thank you received: 2
Adjust Login Switcher Page
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.3
-- PHP version -- : 5.x
Hello.
I need to adjust the login "switcher" page slightly. Basically, I will be changing the page to separate the login in to two more steps. Step 1 - user selects register, login or guest checkout and Step 2 - the process for their selection (See screenshot).
What view(s) will I need to edit in order to complete this and can you give me any tips.
I will most likely do this using javascript/CSS in order to avoid having to hack the actual php code much. The reason I think this will be hard to do in two steps is because I think your code is set up that it would be hard to submit the page.
Unless you can tell me how I add/edit views to the Hikashop component.
Please Log in or Create an account to join the conversation.
To have it in two steps you will mainly have to edit the view "checkout / login".
In this view, edit the display to have what you want, and then add some checks on the current step ($this->step).
If the step is, for example, 1 so display the different options, if it is 2, hide the options but display the form.
In step 1, when selecting the desired method, you can store the value in session, this way when on the second step load the desired form. When clicking on a button of the first step, submit the whole checkout form to move to step 2.
It can potentially require the edition of core file regarding the checks made on the forms to see if the fields are filled or not.
Conclusion, there is a lot of changes to do.
Please Log in or Create an account to join the conversation.
and all the text loaded by the JTEXT class for example
Please Log in or Create an account to join the conversation.
All the text loaded by JText comes from the HikaShop language file that you can edit via the Languages tab of the HikaShop configuration.
Please Log in or Create an account to join the conversation.
Could you explain that function to me or direct me to the source code for it.
Also, where would I find the javascript file (file location and code lines) that handles dynamically changing the switcher form from Login to Registration to Guest when the pertinent radio button is selected. It looks like it is the function named "displayRegistration()".
Thanks.
Please Log in or Create an account to join the conversation.
You can find the source code of that function in the file administrator/components/com_hikashop/helpers/helper.php, the core file of HikaShop. That's where you'll find the definition of all the functions starting with hikashop_
That's indeed the displayRegistration function you're looking for. It's defined in the login function of the file components/com_hikashop/views/checkout/view.html.php
Please Log in or Create an account to join the conversation.
From this line in the checkout/login view
Where would I find the 'hikaselect.radiolist' helper function in the code. I think I want to either create my own helper or maybe just replace the JHTML function with my own php code.
Should I search the Joomla documentation for how to create a new helper? I am sure the original helper will be a good starting point as well.
Please Log in or Create an account to join the conversation.
We had to override the radiolist system of Joomla on 3.x so that it works properly on the frontend.
Please Log in or Create an account to join the conversation.
However there is are two bootstrap views "custom_fields_bootstrap" and "registration_bootstrap"
I am having similar problems understanding
Since there are multiple address views.
Basically, I am trying to track down where the all the code that generates the HTML code for the various registration fields in the login switcher as shown in the screenshot. I have found the code for the login radiolist on the left thanks to your comments. I hope you can help.
Please Log in or Create an account to join the conversation.
loadTemplate is a Joomla function which allow to load a view (or sub view).
If your current view is "registration", loadTemplate('bootstrap') will load "registration_bootstrap".
$this->type is used in the view custom_fields in order to know which time of custom field the view as to display (user, address, etc).
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
When you add it to an existing one via the menu Display>views, you don't loose the changes when you update HikaShop.
If you add new views, it's highly probable that you will loose your changes during each update.
Please Log in or Create an account to join the conversation.
I have completed most of the changes however I have a problem with Guest Checkout. When the guest form is submitted I get the message "Please enter a value for the field password" in an alert box. I have included attachments of the files I edited. If you could look it over and help me identify the problem that would be great. At very minimum I need to know where the function that displays that error is defined and/or where the function validates the fields. Any help would be much appreciated. The Login and the Registration parts work fine. The link to the test site is www.inkacollective.com/testing/consilium/
The only file I changed was the login view. I copy and pasted the javascript from the displayRegistration() function and modified it slightly for my uses, mainly just changing it so it got the value 2 and 3 from the div.id instead of the radio buttons. I left the extra code in there just to be safe. On a side note, in the part of the code where the js declaration is whenever I scroll to that section in the backend of joomla the screen freezes. I have tried copy and pasting from a text file to the login view as well.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.