Many Joomla components like Advanced Module Manager, Engage box, e.t.c. use Custom PHP conditions to show modules, popups, or content on specific pages.
We will see an example of how to serve a module on specific Hikashop product pages by taking data from URL.
Turn SEO off , Global Configuration > Site > “Search Engine Friendly URLs” to “No”.
This will show the URL of the Hikashop product page like this:
/index.php?option=com_hikashop&ctrl=product&task=show&cid=14&name=my-product&Itemid=4270
In order to see there a module, only on the product pages and on a specific item ID, we will take the data from the URL and add them in Advanced Module Manager > Module > Conditions > Custom PHP like this:
// Show on Hikashop pages
return ($app->input->getCmd('option') == "com_hikashop");
// Show on Hikashop product pages
return ($app->input->getCmd('ctrl') == "product");
// Show on Hikashop product pages under the category chosen by ITEMID:316
return ($app->input->getCmd('Itemid') == "316");