- Posts: 11
- Thank you received: 0
Change style of ver registration form
11 years 10 months ago - 11 years 10 months ago #180659
by snarf-eu
Change style of ver registration form was created by snarf-eu
-- HikaShop version -- : 2.3.4
-- HikaMarket version -- : 1.5.1
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1
A have some question on how to change the vendor registration form. What I want to achieve is the following:
Any ideas? Screenshot attached.
Thanks in advance.
-- HikaMarket version -- : 1.5.1
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.3.29
-- Browser(s) name and version -- : Chrome 38.0.2125.111 m, Firefox 33.1.1
A have some question on how to change the vendor registration form. What I want to achieve is the following:
- move the asterixes right behind the textboxes
- create tip messages behind some of the fields
- change the order of the checkbox (checkbox first, then label)
- make a link of the (checkbox) label to an article or popup box with terms and conditions
Any ideas? Screenshot attached.
Thanks in advance.
Last edit: 11 years 10 months ago by snarf-eu.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #180669
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Change style of ver registration form
Hi,
These fields are displaying thanks to HikaShop custom fields.
So if you want to change how the custom fields are display, you will have to create a view override for the "vendormarket | registration" view and change how the custom fields are displayed.
To move the asterisk, you have to use such code
To display some special text, you have to use the variable "$fieldName" and display a message depending the value (which is the namekey of the custom field).
Same thing for the link you want to add, the best is to display your custom content depending the variable "$fieldName".
About the checkbox, it is displayed directly by the HikaShop field class.
it is not something I will recommend but the best way to change it is to modify the HikaShop core file.
Are you sure you can't do something using CSS ?
Regards,
These fields are displaying thanks to HikaShop custom fields.
So if you want to change how the custom fields are display, you will have to create a view override for the "vendormarket | registration" view and change how the custom fields are displayed.
To move the asterisk, you have to use such code
Code:
if($oneExtraField->field_required) echo '* ':
$oneExtraField->field_required = false;
echo $this->fieldsClass->display(
$oneExtraField,
$value,
'data['.$this->form_type.']['.$fieldName.']',
false,
' ' . $onWhat . '="hikashopToggleFields(this.value,\''.$fieldName.'\',\''.$this->form_type.'\',0,\'hikamarket_\');"',
false,
$this->extraFields['vendor'],
@$this->element
);
Same thing for the link you want to add, the best is to display your custom content depending the variable "$fieldName".
About the checkbox, it is displayed directly by the HikaShop field class.
it is not something I will recommend but the best way to change it is to modify the HikaShop core file.
Are you sure you can't do something using CSS ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
11 years 10 months ago #181028
by snarf-eu
Replied by snarf-eu on topic Change style of ver registration form
Hello Jerome,
Thank you for your reply, but i'm still struggling.
Thank you for your reply, but i'm still struggling.
- For the asterix; could you please be more specific on where to add the code? I've tried to add it to vendormarket / registration, but it ended up as a broken form.
- For the extra tips; can you give a full example for address maybe?
- For the checkbox; which core files do I need to change and where .
Please Log in or Create an account to join the conversation.
11 years 10 months ago #181077
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic Change style of ver registration form
Hi,
1/ In the view "vendormarket | registration" there are 3 "blocks" which display custom fields.
I gave you a sample for the "block" vendor which is the last block in the view.
But the idea of the modification is to add the two lines before the line
You can perform that modification in every blocks without having to copy/past the rest of the code, just the first two lines (which have to be added).
2/ Here an example
The field names "iban" and "iban2" are just example ; You have to replace them with the namekey of your custom fields.
3/ The file is "administrator/components/com_hikashop/classes/field.php"
You have to change that line
Regards,
1/ In the view "vendormarket | registration" there are 3 "blocks" which display custom fields.
I gave you a sample for the "block" vendor which is the last block in the view.
But the idea of the modification is to add the two lines before the line
Code:
echo $this->fieldsClass->display(
2/ Here an example
Code:
echo $this->fieldsClass->display(
$oneExtraField,
@$this->address->$fieldName,
'data[address]['.$fieldName.']',
false,
' '.$onWhat.'="hikashopToggleFields(this.value,\''.$fieldName.'\',\'address\',0);"',
false,
$this->extraFields['address'],
$this->address
);
//-- Begin of sample code
if($fieldName == 'iban')
echo ' ' . JText::_('IBAN_TIPS_TEXT');
if($fieldName == 'iban2')
echo ' ' . JText::_('IBAN2_TIPS_TEXT');
//-- End of sample code
?></dd>
3/ The file is "administrator/components/com_hikashop/classes/field.php"
You have to change that line
Code:
$string .= '<input type="'.$type.'" name="'.$map.'" value="'.$oneValue.'" id="'.$id.'" '.$checked.' '.$options.' /><label for="'.$id.'">'.$this->trans($title->value).'</label>';
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: snarf-eu
Please Log in or Create an account to join the conversation.
11 years 9 months ago - 11 years 9 months ago #183300
by snarf-eu
Replied by snarf-eu on topic Change style of ver registration form
Ok, i have found a way make it work, but i'm going to ignore the asterix thing and just use:
echo ' ' . JText::_('my_string'); instead for the required fields as you described earlier.
Those little anoying asterixes cost me too much time already.
echo ' ' . JText::_('my_string'); instead for the required fields as you described earlier.
Those little anoying asterixes cost me too much time already.
Last edit: 11 years 9 months ago by snarf-eu.
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.166 seconds