Custom text in the category list

  • Posts: 187
  • Thank you received: 15
  • Hikashop Business
6 months 1 week ago #356134

-- HikaShop version -- : 5.0.0
-- Joomla version -- : 4.4.0
-- PHP version -- : 8.2

Hello,
I have the menu set to display a list of categories. It displays a list of categories and below the list it displays all products. I would like to separate the category list from the product list with my own text. How to do it?
Tom

Attachments:

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

  • Posts: 81590
  • Thank you received: 13079
  • MODERATOR
6 months 1 week ago #356139

Hi,

I think the best would be to create a custom field of the table "category" via the menu Display>Custom fields. That way, in the main category (and potentially in sub categories too), you can enter the text you want in the custom field. If you configure the field to display on the frontend, it will appear directly at the top of the categories listing. Then, you can move it at the bottom of the categories listing by editing the category / listing view file via the Display>Views menu.
You should be able to do it by moving the code:

if(!empty($custom_fields_html)){ ?>
		<div id="hikashop_category_custom_info_main" class="hikashop_category_custom_info_main">
			<h4><?php echo JText::_('CATEGORY_ADDITIONAL_INFORMATION');?></h4>
			<table class="hikashop_category_custom_info_main_table">
				<?php echo $custom_fields_html; ?>
			</table>
		</div>
		<?php }
after the line:
if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>';

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

  • Posts: 187
  • Thank you received: 15
  • Hikashop Business
6 months 1 week ago #356169

Great, thank you!
It's work :)

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

Time to create page: 0.054 seconds
Powered by Kunena Forum