Author Topic: loadmodule through custom fields  (Read 165 times)

idor

  • Jr. Member
  • **
  • Posts: 98
loadmodule through custom fields
« 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!

pinochico

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1657
    • MiniJoomla
  • Skype Name: support-easysoftware
  • VirtueMart Version: 3
Re: loadmodule through custom fields
« Reply #1 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
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28533
  • Always on vacation
    • Jenkin Hill Internet
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 4.0.14 10805  J 3.10.11 PHP 8.0.27

idor

  • Jr. Member
  • **
  • Posts: 98
Re: loadmodule through custom fields
« Reply #3 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.