Adding text to checkout

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
3 weeks 3 days ago #363595

Looking to add information to the checkout process under "login or create a new account" and before the Login / Register selection.

Thinking a file will need editing (and re edited when code is updated) and associated language file additions made.
Highlight in attached image

Chasing a location is leading me down a rabbit hole :whistle:

Thanks

Attachments:
Last edit: 3 weeks 2 days ago by yerg55. Reason: Solved

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

  • Posts: 82680
  • Thank you received: 13330
  • MODERATOR
3 weeks 3 days ago #363598

Hi,

So, first, note that when you configure your "checkout workflow" in the HikaShop configuration, you can add a "text" view to your checkout. That way you can add custom text to it easily.
www.hikashop.com/support/documentation/4...eckout-workflow.html
Now, with this method, you can only add text between the other views.
Here, you want to add your text directly in the middle of a view, so that won't help you.

Another solution is to use translation overrides in order to change an existing text in order to add your own text:
www.hikashop.com/download/languages.html#modify
This could work here. However, that means that the text you add will have the same style as the text already there. Based on your screenshot, you'll probably want to make the added text smaller than the title, so it's not that straight forward. You would have to add a div element around your extra text with a class that you could then use in your CSS to target the extra text to be able to make it smaller than the main title.

Finally, when you want to add text anywhere else on the interfaces, you want to do a view override:
www.hikashop.com/support/documentation/1...ize-the-display.html
As explained there, you can use the "Display view files" setting to find which view file to edit. And since the changes will be saved as view overrides, you won't loose them when you update your HikaShop.

The following user(s) said Thank You: yerg55

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

  • Posts: 120
  • Thank you received: 14
  • Hikashop Business
3 weeks 3 days ago #363633

Brilliant stuff Nicholas :woohoo:

Your comment gave me an idea for a different approach
Edited the Language file to produce this outcome

LOGIN_OR_REGISTER_ACCOUNT="Login or Register<br/ ><span style="font-size: 12pt;">Use the links below to Login or Register</span>"

Attachments:
Last edit: 3 weeks 2 days ago by yerg55.

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

  • Posts: 82680
  • Thank you received: 13330
  • MODERATOR
3 weeks 2 days ago #363640

Hi,

That's indeed a way to do it. Note that in a translation override, you can't use double quotes, since the text is already surrounded by double quotes. You need to use simple quotes instead, other Joomla might not be able to parse the translation file properly.
I would recommend using instead:

LOGIN_OR_REGISTER_ACCOUNT="Login or Register<br/><span style='font-size: 12pt;'>Use the links below to Login or Register</span>"

Last edit: 3 weeks 2 days ago by nicolas.

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

Time to create page: 0.081 seconds
Powered by Kunena Forum