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

#   Displaying other products from category

##

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

Less More

- Posts: 25
- Thank you received: 1
-
-

12 years 8 months ago [\#141618](#141618) by [acwilan](/forum/user/26763-acwilan "View acwilan's Profile")  *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141618 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")* was created by *[acwilan](/forum/user/26763-acwilan "View acwilan's Profile")*

Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?

-- url of the page with the problem -- : [ mywebsite.com/mypage](http://mywebsite.com/mypage)
-- HikaShop version -- : x.x.x
-- Joomla version -- : x.x
-- PHP version -- : x.x.x
-- Browser(s) name and version -- : XXXXX x.x.x
-- Error-message(debug-mod must be tuned on) -- : Error_message

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 8 months ago [\#141619](#141619) by [kathleyne](/forum/user/30874-kathleyne "View kathleyne's Profile")  Replied by *[kathleyne](/forum/user/30874-kathleyne "View kathleyne's Profile")* on topic *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141619 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")*

I think I'm having the same issue. When a user clicks on the category name, I want only the products in that category to appear. Haven't been able to figure out how to do it with filters.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

12 years 8 months ago [\#141644](#141644) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141644 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")*

Hi,

@acwilan :
A solution can be to use a related products module, You'll find more information about this through this [ thread](http://www.hikashop.com/support/documentation/integrated-documentation/19-hikashop-product-form.html#related).

@kathleyne :
Can you give me more information about the issue that you are having, and show me how did you configured your category listing and its associated module through some screenshots for example ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 2
- Thank you received: 0
-
-

12 years 8 months ago [\#141737](#141737) by [kathleyne](/forum/user/30874-kathleyne "View kathleyne's Profile")  Replied by *[kathleyne](/forum/user/30874-kathleyne "View kathleyne's Profile")* on topic *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141737 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")*

Sure, here's a screen cap! I have two modules doing the same thing. They are both set up to be Category modules. They list categories of product that contain product. When I click on one of the categories, they next page shows all of my product rather than taking me to the product within the category I've clicked on.

I've tried using a filter, and used every setting option I can find.
[ ![h3a4e0b1.png](/forum/attachment/14989) ](/forum/attachment/14989 "h3a4e0b1.png")

- [ ![h3a4e0b1.png](/forum/attachment/14989) ](/forum/attachment/14989 "h3a4e0b1.png") [ ](/forum/attachment/14989?download=1 "h3a4e0b1.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 25
- Thank you received: 1
-
-

12 years 8 months ago [\#141784](#141784) by [acwilan](/forum/user/26763-acwilan "View acwilan's Profile")  Replied by *[acwilan](/forum/user/26763-acwilan "View acwilan's Profile")* on topic *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141784 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")*

Yes, the problem is that my customer doesn't want to enter manually one-by-one each product related to other products. So in the meantime he wants to display the related products module, and if it doesn't has related products, display other products from the same category. What I'm trying to do in the &#96;show_default.php&#96; template of the &#96;product&#96; view is something like this:
Code:

&lt;div class="shop-product-related"&gt; &lt;div class="shop-title-container"&gt; &lt;h1&gt; Related Products &lt;/h1&gt; &lt;?php $html = $renderer-&gt;render('product-related-products', array('style' =&gt; 'default'), null); if (empty($html)) { $html = $renderer-&gt;render('category-products', array('style' =&gt; 'default'), null); } echo $html; ?&gt; &lt;/div&gt; &lt;/div&gt;

But I don't know how to render a "other products from this same category" module. So I was thinking there must be something like:
Code:

$catClass = hikashop_get('class.category'); $category = $catClass-&gt;get($this-&gt;element-&gt;category_id); $products = $category-&gt;getProducts(); foreach ($product in $products) { if ($product-&gt;product_id != $this-&gt;element-&gt;product_id) { ..... } }

Is it possible?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

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

Less More

- Posts: 25
- Thank you received: 1
-
-

12 years 8 months ago [\#141785](#141785) by [acwilan](/forum/user/26763-acwilan "View acwilan's Profile")  Replied by *[acwilan](/forum/user/26763-acwilan "View acwilan's Profile")* on topic *[Displaying other products from category](/forum/31-development/865411-displaying-other-products-from-category#141785 "Hi, I need to display in my template, on the product detail page, a list of products from the same category. Is there a specific module to do this? Or do I have to code?  -- url of the page with the problem -- :   mywebsite.com/mypage  -- HikaShop version -- : x.x.x -- Joomla version -- : x.x -- PHP version -- : x.x.x -- Browser(s) name and version -- : XXXXX x.x.x -- Error-message(debug-mod must be tuned on) -- : Error&#95;message")*

This might be helpful. I'll give it a shot.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg2NTQxMS1kaXNwbGF5aW5nLW90aGVyLXByb2R1Y3RzLWZyb20tY2F0ZWdvcnk/dG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) 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.104 seconds

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

[](#top)
