VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: Ferran on November 24, 2020, 13:20:14 PM

Title: Call a plugin { } from short description
Post by: Ferran on November 24, 2020, 13:20:14 PM
Hi guys;

I want to enable the plugins in the short description, I found in the forum a solution, including prepare.content but it doesn't work, do you see something wrong there?

Joomla 3.9.22 & Virtuemart 3.8.6

ORIGINAL CODE:

<p class="product_s_desc">
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
echo shopFunctionsF::limitStringByWord ($product->product_s_desc, 600, ' ...') ?> <?php } ?> </p>

CODE WITH PREPARE CONTENT:

<p class="product_s_desc">
<?php // Product Short Description
if (!empty($product->product_s_desc)) {
echo JHTML::_('content.prepare',$product_name); ?>  <?php } ?> </p>



Thanks in advance

Title: Re: Call a plugin { } from short description
Post by: pinochico on November 24, 2020, 13:58:47 PM
short description is not content

maybe right?:

echo JHTML::_('content.prepare',$product->product_name); ?>  <?php } ?> </p>
Title: Re: Call a plugin { } from short description
Post by: Ferran on November 24, 2020, 15:17:24 PM
Ohhh damn..true.. now is Perfect ;) Thanks!