[Skip to main content](#vessel-content)

#   Category display

##

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

3 months 2 days ago [\#372955](#372955) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  *[Category display](/forum/26-product-category-display/910738-category-display#372955 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")* was created by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")*

-- HikaShop version -- : 6.5.2
-- Joomla version -- : 6.1.2
-- PHP version -- : 8.3

I have a simple need, i want to have a module to display some categories based on my own selection.
isn't it possible in HikaShop ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14284
-
-

3 months 2 days ago [\#372957](#372957) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#372957 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

Hi,

The HikaShop module (Type of content: Categories) lists the sub-categories of one main category you pick. So it can only show categories that share the same parent, it has no option to hand-pick categories from different branches of your tree.

To get your own selection you have two ways:

1) Bring them under one parent. Create a category to act as the container, then change the parent of each category you want to feature so they sit under it (drag and drop in the Categories page, or set the parent in each category's edit form). This does not move or unlink your products, they stay in their categories. Then point the module at that container and it lists exactly your selection. This gives you the normal HikaShop category tiles with images.

2) Leave the categories where they are and build the list by hand. Add a Joomla "Custom" (Custom HTML) module and put a link, and an image if you want, to each chosen category in it. More manual, but nothing in your category tree changes.

If the featured categories can live together, option 1 is the cleaner one. If they must stay spread across your tree, option 2 is the way.
On our end, we'll look at what we can do to allow for this in the future as I think this would be great to allow more flexibility here.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

3 months 2 days ago [\#372958](#372958) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#372958 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

It's really strange that we don't have such a simple feature in Heikashop. The site has dozens of categories, and I want to show just a few of them in a module. I need the category information, like their images, canonical links, or their custom fields... so using joomla custom html module is not the way to do this ...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14284
-
-

3 months 1 day ago -  3 months 1 day ago [\#372959](#372959) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#372959 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

As I said yesterday, we'll look into this. In fact, I've already looked into it before reading your message today and I've made some improvements to allow for it. So you just have to wait for the next release if the alternatives I propose do not meet your needs.

Last edit: 3 months 1 day ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

The following user(s) said Thank You: [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

3 months 1 day ago [\#372962](#372962) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#372962 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

Thank you very much
please consider the same thing for products as well

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14284
-
-

3 months 1 day ago [\#372963](#372963) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#372963 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

Hi,

For products you can easily do it. Create an unpublished category, configure the HikaShop content module to display the products of that category, and add the category to the products you wish to display in that module.

The following user(s) said Thank You: [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

2 months 3 weeks ago [\#373030](#373030) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#373030 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

I created a custom modules to select and display categpries .... i can get all of category infomation except its image .. how can i get the image of each category ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86323
- Thank you received: 14284
-
-

2 months 3 weeks ago [\#373031](#373031) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Category display](/forum/26-product-category-display/910738-category-display#373031 "-- HikaShop version -- : 6.5.2 -- Joomla version -- : 6.1.2 -- PHP version -- : 8.3  I have a simple need, i want to have a module to display some categories based on my own selection. isn't it possible in HikaShop ?")*

Hi,

The category image is not a column on the category table, which is why your module can read every field except the image. Images are stored in a separate table (hikashop_file), one row per image, linked to the category with file_type = 'category' and file_ref_id = the category id. A category can have several images.

So you have two options.

1) Let the category class attach the image for you. When you load the categories through HikaShop's category class, pass its "category_image" argument as true, and each row then carries file_path (plus file_name and file_description):
Code:

$categoryClass = hikashop_get('class.category'); // getChildren($parentId, $all, $filters, $order, $start, $limit, $category_image = true) $categories = $categoryClass-&gt;getChildren($parentId, false, array(), '', 0, 100, true);

If you hand-pick the categories by id instead of by parent, just load their images yourself and match them on the category id:
Code:

$db = JFactory::getDbo(); $db-&gt;setQuery('SELECT file_ref_id, file_path, file_name, file_description FROM '.hikashop_table('file'). ' WHERE file_type = '.$db-&gt;quote('category').' AND file_ref_id IN ('.implode(',', $ids).') ORDER BY file_ordering ASC'); $images = $db-&gt;loadObjectList('file_ref_id'); // keyed by category id // $images[$categoryId]-&gt;file_path is the image path of that category

2) To display it the way HikaShop does (same resized and cached thumbnail, same img tag), give that file_path to the image helper:
Code:

$image = hikashop_get('helper.image'); $options = array('default' =&gt; true, 'forcesize' =&gt; true, 'scale' =&gt; 'inside'); $thumb = $image-&gt;getThumbnail($cat-&gt;file_path, array('width' =&gt; $image-&gt;main_thumbnail_x, 'height' =&gt; $image-&gt;main_thumbnail_y), $options); echo $image-&gt;renderImgFrom($thumb, array('class' =&gt; 'hikashop_category_image', 'alt' =&gt; $cat-&gt;file_name));

That last part is exactly what the default category listing uses (front/views/category/tmpl/listing_img_pane.php), so your module will match the rest of the shop.

The following user(s) said Thank You: [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MTA3MzgtY2F0ZWdvcnktZGlzcGxheT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.091 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
