Author Topic: [SOLVED] Dynamic module position within product layout?  (Read 1044 times)

EvanGR

  • Jr. Member
  • **
  • Posts: 333
[SOLVED] Dynamic module position within product layout?
« on: December 09, 2019, 15:36:56 pm »
I am trying to add new module positions, inside the product layout.

I inserted the following in the product template override file (php):
Code: [Select]
<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

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9653
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Dynamic module position within product layout?
« Reply #1 on: December 09, 2019, 15:39:24 pm »
Quote
Something 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 http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Spyros Petrakis

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 102
    • OlympianThemes
  • VirtueMart Version: Always latest Stable
Re: Dynamic module position within product layout?
« Reply #2 on: December 10, 2019, 14:18:45 pm »
You can also try this :

Code: [Select]
echo JHtml::_('content.prepare', '{loadposition YOUR_POSITION}');
Fast and simple to use templates with fanatical support
https://www.olympianthemes.com

EvanGR

  • Jr. Member
  • **
  • Posts: 333
Re: Dynamic module position within product layout?
« Reply #3 on: December 11, 2019, 09:35:15 am »
Thank you people!