Insert third-party plugin

  • Posts: 127
  • Thank you received: 3
3 years 7 months ago #322503

-- url of the page with the problem -- : abierto.uy
-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3

Hello

I installed on the site a plugin to open a site module in a popup (login for example) and I would need to insert it in the product page view, I did a test and it doesn't work as expected.
If I insert the plugin call in a content article it works correctly, but if I insert it in the "tabular" product view it doesn't recognize it and displays the code instead of the button I need to be displayed.
Could you help me, tell me if I can do something like this or if I am making a mistake?

The plugin is called qlmodal PRO and the code I am trying to insert into the view is as follows:

<p> {qlmodal id = "botonInicio" type = "button" toggle = "modal" class = "someCssClass anotherCssClass"} Login {/ qlmodal} </p>
<p> {qlmodal id = "botonInicio" type = "content" title = "Some headline"} {loadmoduleid 486} {/ qlmodal} </p>


Thanks greetings !

Please Log in or Create an account to join the conversation.

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
3 years 7 months ago #322504

Hi,

That's because the way the plugin works. It's a content plugin and thus it can only replace its tags in a content (joomla article, HikaShop product description, etc). Not in the middle of the code.
It's the same with the loadmodule content plugin of Joomla which allows you to load modules inside a content.
And if you want to load a module anywhere else, you need a plugin like "modules anywhere" ( www.regularlabs.com/extensions/modulesanywhere ) which is developed to do the same but anywhere in the code. It's more complex to develop, but more versatile.

So instead of using qlModal, you could use popup anywhere: extensions.joomla.org/extension/popup-anywhere/
That plugin, like modules anywhere, it made to work anywhere on your Joomla website.

One alternative can also be to tell joomla that these tags are content:
docs.joomla.org/Triggering_content_plugins_in_your_extension

The following user(s) said Thank You: zetap

Please Log in or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 3
3 years 7 months ago #322518

Hi, thanks for your response

Unfortunately the popup-anywhere plugin is no longer available, maybe you know another one with the same functionality.

With the other option, I couldn't get it to work either. I have little experience, but I understand that the code of the link you sent me, I must add it in the view where I need to use qlModal (product / show_tabular.php).
Adapt the code but it didn't work, it shows error message:

"500 JHtml qlmodal not found."

I leave it copied here in case you understand it and can give me some help

$text = JHtml::_('qlmodal.prepare', $text);
$article = new stdClass;
$article->text = $text;
$params = new JObject;
JPluginHelper::importPlugin('qlmodal');
$dispatcher = JEventDispatcher::getInstance();
$dispatcher->trigger('onContentPrepare', array('some.context', &$article, &$params, 0));

Thanks greetings !

Please Log in or Create an account to join the conversation.

  • Posts: 127
  • Thank you received: 3
3 years 7 months ago #322523

Hello,

I continued researching and found the plugin www.regularlabs.com/extensions/modals that also works on any component. I loaded the login module into a content article and show it in the popup correctly.
The only problem I have is that after logging in, the article containing the module loads, instead of staying on the page from which the popup opens, the product page.

The code I use to load the popup is:

{modal url="/login" width="500" height="430"}Login{/modal}

If you have any suggestion, it will be very useful to me.

Thanks greetings !

Please Log in or Create an account to join the conversation.

  • Posts: 81378
  • Thank you received: 13037
  • MODERATOR
3 years 7 months ago #322537

Hi,

No, you just need the line:

echo JHtml::_('content.prepare', $text);
Regarding the behavior of the popup / module plugins with the login system of Joomla I can't help.
I don't know how they are coded under the hood.
Maybe you want to contact the developer of that plugin instead ?

Please Log in or Create an account to join the conversation.

Time to create page: 0.064 seconds
Powered by Kunena Forum