- Posts: 3
- Thank you received: 0
Custom Message for Guest Registration
- ji_jenny2110
-
Topic Author
- Offline
Less
More
8 years 2 weeks ago #298184
by ji_jenny2110
Custom Message for Guest Registration was created by ji_jenny2110
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.2
-- Browser(s) name and version -- : chrome
We are using the Business Edition of Hikashop.
I am using the switcher on the checkout. But I would like to publish custom messages for each option (login, registration and guest).
I have managed to publish custom messages for login (view: sub_block_login_form) and registration (view: sub_block_login_registration - inside the div id="hikashop_registration_name_line" as it is not published on the guest view), but I cant find a way to publish a custom message on the Guest view. Always when I try, for example, in the div class="hikashop_registration_email_line", it is also published on the registration tab, as these fields are used for both tabs.
Unfortunaly I have not much (better say none) knowledge of php.
Could you give me a hint to archieve that?
Thanks and best regards
Jenny
-- Joomla version -- : 3.8.10
-- PHP version -- : 7.2
-- Browser(s) name and version -- : chrome
We are using the Business Edition of Hikashop.
I am using the switcher on the checkout. But I would like to publish custom messages for each option (login, registration and guest).
I have managed to publish custom messages for login (view: sub_block_login_form) and registration (view: sub_block_login_registration - inside the div id="hikashop_registration_name_line" as it is not published on the guest view), but I cant find a way to publish a custom message on the Guest view. Always when I try, for example, in the div class="hikashop_registration_email_line", it is also published on the registration tab, as these fields are used for both tabs.
Unfortunaly I have not much (better say none) knowledge of php.
Could you give me a hint to archieve that?
Thanks and best regards
Jenny
Please Log in or Create an account to join the conversation.
8 years 2 weeks ago #298188
by GW
Replied by GW on topic Custom Message for Guest Registration
Hi,
you can't achieve that with PHP only since switching between the registration and guest form is done with Javascript, without reloading the entire page. You can find the Javascript code for this in the view file show_block_login from line 199 onwards.
If you study the code for a bit, you can see for example that the password field is given the variable pwd, which gets a display of "none" when the guest tab is selected (line 311).
If you want to add a custom message only when the guest form is selected, you could add your message in the view sub_block_login_registration wherever you want and give the html element a unique id. Then add it along with the Javascript in the view show_block_login, simply follow along with the pwd, everywhere it gets a display of none you want to show your message, and vice versa.
Hope that helps!
you can't achieve that with PHP only since switching between the registration and guest form is done with Javascript, without reloading the entire page. You can find the Javascript code for this in the view file show_block_login from line 199 onwards.
If you study the code for a bit, you can see for example that the password field is given the variable pwd, which gets a display of "none" when the guest tab is selected (line 311).
If you want to add a custom message only when the guest form is selected, you could add your message in the view sub_block_login_registration wherever you want and give the html element a unique id. Then add it along with the Javascript in the view show_block_login, simply follow along with the pwd, everywhere it gets a display of none you want to show your message, and vice versa.
Hope that helps!
The following user(s) said Thank You: Philip, ji_jenny2110
Please Log in or Create an account to join the conversation.
- ji_jenny2110
-
Topic Author
- Offline
Less
More
- Posts: 3
- Thank you received: 0
8 years 2 weeks ago #298191
by ji_jenny2110
Replied by ji_jenny2110 on topic Custom Message for Guest Registration
Thanks a lot! That worked like a charm!
Best regards Jenny
Best regards Jenny
Please Log in or Create an account to join the conversation.
Time to create page: 0.201 seconds