- Posts: 68
- Thank you received: 2
field layout of address fields on checkout page
-- Joomla version -- : latest
-- PHP version -- : 5.3
-- Browser(s) name and version -- : latest
Hi,
I'd like to re-arrange field-layout of address fields on checkout page. Can't find the right view.
I've managed to do the same with the user-fields on the checkout-page but the address fields seem to be rendered different.
See screenshot please
thanks in advance.
Mark
Please Log in or Create an account to join the conversation.
Just change their ordering in the custom fields.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I haven't been clear enough, my bad.
The ordering is not a problem, I do want to rearrange the label / input field / asterisk (on one line) like the user-fields above the address fields. See the attachment in previous post.
Thanks
Mark
Please Log in or Create an account to join the conversation.
- Posts: 12953
- Thank you received: 1778
The solution will be to :
- Use some CSS code : www.hikashop.com/support/documentation/1...the-display.html#css
OR
- Directly edit the code of the "Registration" file of the "User" View of your front-end template via "Hikahsop->Display->Views".
Please Log in or Create an account to join the conversation.
That is what i was thinking also but whatever I change in the registration-file nothing happens.
Also the way the user-fields are displayed is different then the way of displaying the address-fields.
That is why I was able to change the layout of user fields (see first attachment) but I'm tucked with the address-fields.
Seems there is another file loaded which I can't find?
Any ideas?
Thanks again.
Mark
Please Log in or Create an account to join the conversation.
You must have the "use bootstrap design" option activated in the HikaShop configuration. In that case, it's the registraion_bootstrap view file that you want to edit instead.
Please Log in or Create an account to join the conversation.
In this file there are no address fields. only below code loading the address.
I try to find the file with the address fields so I can change the layout like I did with the user-fields (above address fields on checkout page).
Thanks again.
Mark
Please Log in or Create an account to join the conversation.
For the address and user custom fields ; when using bootstrap design, view is "user | custom_fields_bootstrap".
If you're not using the bootstrap design, the view is "user | custom_fields".
The view "registration / registration_bootstrap" are the containers for the main fields and call the other view for display the custom fields.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Indeed I've found the file user | custom_fields_bootstrap.
But how can I re-arrange the layout of the fields in one line, I don't like to change the order but just the position of the label | field | mandatory-asterisk (*)
I'd like to arrange the fields like:
label * field
now its showing like
label field *
the code says:
Please Log in or Create an account to join the conversation.
Great !
So the explanation of the next step is there (even if it's for HIkaMarket, the trick is the same):
www.hikashop.com/forum/23-market-how-to/...ion-form.html#180669
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
I'll have a look at that.
Mark
Please Log in or Create an account to join the conversation.
Since the required update I'd like to submit is affecting the HS-core-class "administrator/components/com_hikashop/classes/field.php",
what is the best way to realise this? My view file is: user | custom_fields_bootstrap. The only function which I'd like to redefine is the field "display" function in the field.php (class). So I tried to copy this function from the field class into my view-file and rename it.... but this was not working probably because there are more (helper) classes needed.
I'd like to change the display-function in the field.php class-file without losing changes after hockshop-upgrade (see function-code below).
Hop you can guide me in right direction.
Thanks in advance.
Mark
Please Log in or Create an account to join the conversation.
There is no need to copy that function in your view or change the code of the core field.php file.
There are just two simple change to do if you want the * after the label instead of after the input:
1. Add that CSS on your website in order to hide the * after the input: .hikashop_field_required{ display : none; }
2. In your view file, after the line:
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
which displays the label, just add such code:
<?php if($oneExtraField->field_required) echo '*'; ?>
Please Log in or Create an account to join the conversation.
Thats fine, but I do need a div-structure which is different than the core structure.
See my screen print and watch the e-mail-field. This is what I want for the address-fields to display like.
The label and asterisks are placed just before the input-field (see the e-mail-div-structure which I altered myself in the view).
Thanks so far.
Mark
Please Log in or Create an account to join the conversation.
So what is the problem with that ?
Just change the div structure in the view file to have what you want.
It is not related to what I said in my previous message with the * placement.
You want to move the lines:
<?php echo $this->fieldsClass->getFieldName($oneExtraField);?>
<?php if($oneExtraField->field_required) echo '*'; ?>
after:
<div class="controls">
in the view file as far as I can see in your screenshots.
Please Log in or Create an account to join the conversation.
Your totally right, sometimes I'm thinking to difficult....
I've done it (see screenshot).
Thanks again.
Mark
Please Log in or Create an account to join the conversation.