Changing the add to cart text

  • Posts: 47
  • Thank you received: 6
  • Hikashop Business
6 days 15 hours ago #369619

-- HikaShop version -- : 5.1.6
-- Joomla version -- : 5.3.1
-- PHP version -- : 8.2
-- Browser(s) name and version -- : firefox

Hello,
I would like to know how to change the "add to cart" text depending on the product or category as I'm selling products but also seats for a workshop on my website. So I'd like to have "Reserve your spot" appearing rather than "add to the cart" for the workshop. Is there an easy way to do that?
Thank you!

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

  • Posts: 84808
  • Thank you received: 13808
  • MODERATOR
6 days 11 hours ago #369621

Hi,

You can do that purely via a translation override in HikaShop. Just go in the back-office:

1. In Joomla admin, go to Components → HikaShop → Configuration → Languages.
2. Click the edit icon for your current language. In the editor, copy the line with the key for “Add to cart” (probably `ADD_TO_CART`) into the override textarea.
3. Change the translation on the right-hand side to your preferred wording (for example, “Reserve your spot”) and save.

This way, your custom text will persist across updates.
For more details, see the “How to modify translations” documentation :
www.hikashop.com/download/languages.html#modify

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

  • Posts: 47
  • Thank you received: 6
  • Hikashop Business
6 days 8 hours ago #369627

Thank you Nicolas for your answer, but what I meant is that I have various categories (original artworks, fine art prints and events). For some categories (original artworks and fine art prints) the "add to cart" text is what I need. However, I would like to change the text that appears for products in the events category. So, some of my products would have the "add to cart" text and some will have the "reserve your spot" text.

I think that what you are suggesting I do in your answer will change the text for all products which is not what I want.

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

  • Posts: 84808
  • Thank you received: 13808
  • MODERATOR
5 days 18 hours ago #369628

Hi,

Indeed.
In that case, you want to create a custom field of the table "product" with the column name "product_addtocart_message".
You could have it of the type "text", and enter the text you want in each product, for the ones that need another text than the default one.
Or you could have a "radio" or "single dropdown" type, with the values being the different texts for the button. Then, in each product, you can select the value you want.

The following user(s) said Thank You: Noe

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

  • Posts: 47
  • Thank you received: 6
  • Hikashop Business
5 days 18 hours ago #369631

Thank you Nicolas! This works perfectly!

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

Time to create page: 0.060 seconds
Powered by Kunena Forum