How to display extra text in hikashop_product_right_part

  • Posts: 54
  • Thank you received: 2
  • Hikashop Business Hikashop Essential
3 months 1 week ago #305596

Hi,

I needto display some additional text in hikashop_product_right_part of the product view. And I need to do this for particular categories and their subcategories only..

How do I achieve this in Hikashop Essential?

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

  • Posts: 66270
  • Thank you received: 9716
  • MODERATOR
3 months 1 week ago #305605

Hi,

You can create a custom field of the table "product" via the menu Display>Custom fields.
If you enter some text in the custom field in the product, it will be displayed on the product page of that product on the frontend if you activate the corresponding display option of the custom field. Products without the custom field filled in won't have it.

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

  • Posts: 54
  • Thank you received: 2
  • Hikashop Business Hikashop Essential
3 months 1 week ago #305643

Thank you for your answer Nicolas.

The problem with the custom field is that it all depends on the user editing the custom field. I'm looking for a way to force the displayed text if the product belongs to particular categories.

Is there a way to do this in php and can you help me with the code?

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

  • Posts: 2186
  • Thank you received: 292
  • MODERATOR
3 months 6 days ago #305648

Hello,

Then why don't use the Categorie restriction, in your custom field configuration, Restriction part



Hope this will fit your needs.
Regards

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

  • Posts: 54
  • Thank you received: 2
  • Hikashop Business Hikashop Essential
3 months 6 days ago #305695

I thought of that, but the customer is using Hikashop Essential. The category restriction is only available in the Business version. It's a very small shop and they don't want to upgrade to the Business version just because of this.

Meanwhile we have placed the text in the Joomla sidebar.

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

  • Posts: 66270
  • Thank you received: 9716
  • MODERATOR
3 months 6 days ago #305697

Hi,

In that case, in the show_default view file, you have the categories of the current product in $this->categories.
www.hikashop.com/forum/5-support-en-fran...es-d-un-produit.html
So you could add some custom code on that array to check if the product is is one category or not and then echo the text you want.

The following user(s) said Thank You: jvstratum

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

Time to create page: 0.061 seconds
Powered by Kunena Forum