Custom text in the category list

  • Posts: 193
  • Thank you received: 15
  • Hikashop Business
1 year 1 month 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: 83007
  • Thank you received: 13399
  • MODERATOR
1 year 1 month 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: 193
  • Thank you received: 15
  • Hikashop Business
1 year 1 month ago #356169

Great, thank you!
It's work :)

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

Time to create page: 0.057 seconds
Powered by Kunena Forum