Custom Message for Guest Registration

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
5 years 7 months ago #298184

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 200
  • Thank you received: 75
5 years 7 months ago #298188

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!

The following user(s) said Thank You: Philip, ji_jenny2110

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
  • Hikashop Business
5 years 7 months ago #298191

Thanks a lot! That worked like a charm!

Best regards Jenny

Please Log in or Create an account to join the conversation.

Time to create page: 0.068 seconds
Powered by Kunena Forum