VirtueMart Forum

VirtueMart 2 + 3 + 4 => Installation, Migration & Upgrade => Topic started by: idor on March 14, 2023, 12:19:28 PM

Title: loadmodule through custom fields
Post by: idor on March 14, 2023, 12:19:28 PM
VirtueMart 4.0.12 10777 and Joomla ‎4.2.8

Hi!
Ιn a product in Virtuemart I am trying to load some modules but it doesnt work.

In joomla 3 Ι was using modules anywhere plugin, through custom fields with this code
{modulepos position="mymoduleposition"}
and it was working!

But in Joomla 4, modules anywhere is not compatible, so I am trying with the default Content - Load Module
I tried with this
{loadposition mymoduleposition}
or {loadmoduleid mymoduleposition}
and neither of these work.

The loadmodule and loadmoduleid is working in product's description, but not throught custom fields, which is what I need!

Any suggestions??
Thank you!
Title: Re: loadmodule through custom fields
Post by: pinochico on March 14, 2023, 17:51:55 PM
I don't know exactly, but in override sublayout for customfield you can add trigger for content plugin - look at the product description
Title: Re: loadmodule through custom fields
Post by: jenkinhill on March 16, 2023, 15:08:11 PM
See this thread:  http://forum.virtuemart.net/index.php?topic=149402.msg533374#msg533374
Title: Re: loadmodule through custom fields
Post by: idor on March 17, 2023, 10:45:34 AM
Hi,
Finally there is a version of "modules anywhere" which is compatible with Joomla 4. BUT I found out that there is a problem loading text (anykind of text) if I use a specific custom field type..
If I create a custom field type Editor, and put default value any text or code 
(in my case this code {module title="My module´s name..."}   )
the default value doesn´t load when I call the custom field from the product page.
I had to create custom fields: type textarea instead.