Skip to main content

Custom text in the category list

More
2 years 11 months ago #356134 by StudioPrzyLesie
-- 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

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

More
2 years 11 months ago #356139 by nicolas
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:
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:
Code:
if(!empty($html)) echo '<div class="hikashop_subcategories_listing">'.$html.'</div>';

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

More
2 years 11 months ago #356169 by StudioPrzyLesie
Great, thank you!
It's work :)

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

Time to create page: 0.153 seconds
Powered by Kunena Forum