Search
Other Advanced Module Manager questions
Forum

advanced module manager pro with virtuemart condition not working

Massimiliano Gatto's Avatar Massimiliano Gatto
virtuemart is not shown as condition in advanced module manager pro, joomla version 4.

Confidential information:
(hidden)



thanks
Peter van Westen's Avatar Peter van Westen ADMIN
Correct. There are no conditions specifically for VM in Advanced Module Manager for Joomla 4.
Please post a rating at the Joomla! Extensions Directory
Massimiliano Gatto's Avatar Massimiliano Gatto
Hello,
are you going to have it in the future?
Peter van Westen's Avatar Peter van Westen ADMIN
No, there are no plans to add specific support for it.
Please post a rating at the Joomla! Extensions Directory
Massimiliano Gatto's Avatar Massimiliano Gatto
how do you suggest to use advance module manager to use in certain virtuemart pages? May I use URL?
thanks
Peter van Westen's Avatar Peter van Westen ADMIN
Yes, if the URL condition covers what you need it for, you can use that.
For more specific things you could use the Custom PHP conditions.
Please post a rating at the Joomla! Extensions Directory
Massimiliano Gatto's Avatar Massimiliano Gatto
thank you, do you have the php code to permit to show the module only when we see a product page of product that is in a certain category id in virtuemart? I can also pay for it because this will resolve all my update problem Im facing now.

thanks
Peter van Westen's Avatar Peter van Westen ADMIN
See if you can find a unique part in the URL you can use to create the URL condition.

If not, you'd have to ask VM support if they can provide you with a php snippet to do the check.

docs4.regularlabs.com/advancedmodulemana...ustom-php-conditions
Please post a rating at the Joomla! Extensions Directory
Massimiliano Gatto's Avatar Massimiliano Gatto
I have resolved with this code:
try{
$jinput = JFactory::getApplication()->input;
$p_id = $jinput->get('virtuemart_product_id');


// The Category ID it should appear on, more on comment
$category_id = 165;
//$category_id2 = 78;

/**check if a product is in a category**/

$db = JFactory::getDbo();


// Create a new query object.
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__virtuemart_product_categories'));
$query->where($db->quoteName('virtuemart_product_id') . ' LIKE ' . $db->quote($p_id).' AND '. $db->quoteName('virtuemart_category_id') .' LIKE '.$db->quote($category_id));

//for multiple categories use: $query->where($db->quoteName('virtuemart_product_id') . ' LIKE ' . $db->quote($p_id).' AND '. $db->quoteName('virtuemart_category_id') .' IN ('.$db->quote($category_id).','.$db->quote($category_id2).')');

$db->setQuery($query);

$results = $db->loadRowList();

foreach ($results as $row) {
return true;
}
return false;

}
catch(Exception $e){
return false;}
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription