Skip to main content

How to display extra text in hikashop_product_right_part

7 years 7 months ago #305596 by jvstratum
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.

7 years 7 months ago #305605 by nicolas
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.

7 years 7 months ago #305643 by jvstratum
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.

7 years 7 months ago #305648 by Philip
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.

7 years 7 months ago #305695 by jvstratum
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.

7 years 7 months ago #305697 by nicolas
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.064 seconds
Powered by Kunena Forum