News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

show categored products on product detail page

Started by gpessoa, February 27, 2021, 20:47:22 PM

Previous topic - Next topic

gpessoa

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

Quote from: gpessoa 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?

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

gpessoa

QuoteHave 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)
<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