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

[SOLVED] Dynamic module position within product layout?

Started by EvanGR, December 09, 2019, 15:36:56 PM

Previous topic - Next topic

EvanGR

I am trying to add new module positions, inside the product layout.

I inserted the following in the product template override file (php):
<jdoc:include type="modules" name="product-modules-bottom"   />

I then assigned a custom module to that position. But it doesn't seem to work?
Something I missed?

Thanks

GJC Web Design

QuoteSomething I missed?
yep .. that is only joomla template code

try

$modules = JModuleHelper::getModules('your_position');
foreach ($modules as $module)
{
echo JModuleHelper::renderModule($module);
}
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Spiros Petrakis

You can also try this :

echo JHtml::_('content.prepare', '{loadposition YOUR_POSITION}');
Joomla templates and extensions development
https://www.yourgeek.gr