Author Topic: show categored products on product detail page  (Read 4847 times)

gpessoa

  • Jr. Member
  • **
  • Posts: 164
Re: show categored products on product detail page
« Reply #15 on: March 02, 2021, 18:50:53 pm »
Is there a way to echo this module to show products filter from the last category tree that the product is in?

This it will do for me!
Maybe better then using unpublished categories condition.
J 3.10.5; VM 3.4.2; PHP 7.2.34

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4664
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: show categored products on product detail page
« Reply #16 on: March 03, 2021, 11:52:05 am »
Is there a way to echo this module to show products filter from the last category tree that the product is in?

Have you try to show the standard product module ? You can choose to show product from current category, so it should work

gpessoa

  • Jr. Member
  • **
  • Posts: 164
Re: show categored products on product detail page
« Reply #17 on: January 04, 2022, 19:20:18 pm »
Quote
Have you try to show the standard product module ? You can choose to show product from current category, so it should work


Yes, I’m using standard Virtuemart Module “mod_virtuemart_product” but I need a condition  to only show products from the last category tree that product belongs!
and in the module Category filter, there are not that item to select;

only Top Level Category and also all categories on the system…

The solution could be:
-   Add php code to “mod_virtuemart_product” to allow also filtering by Last Category Level

-   Or a code condition to only echo the Last Category Level products
        (this code need to be completed)
Code: [Select]
<div class="related-colours">
 <?php //shows related colours by last category level
if (VmConfig::get('category'0) == 1) {   
if (!empty(
$this->product->category)){   

 echo 
'{module related-colours}';

}
}
?>
J 3.10.5; VM 3.4.2; PHP 7.2.34