News:

Support the VirtueMart project and become a member

Main Menu

Support for content plugins

Started by nordmograph, October 20, 2011, 15:03:37 PM

Previous topic - Next topic

nordmograph

Hello

I read the sticky post and understood that front end content plugin will not be supported in VM2.0 but probably in future updates
true? If so any clue on when?

I need an event to display a plugin on category pages and on product pages. Will this be possible?
If not I'll have to use a module instead but a plugin would be more suitable.

Thanks for letting me know

PRO


alatak

Hi,

Content plugin work in the product description.
Please update to the J version.

nordmograph

#3
Hi thanks a lot for your replies

Edit: oups sorry I just found it
My content plugin working in j1.7 content articles doesn't seem to work in products page
Anything specific I missed?

What about in category pages I also need a plugin to load and show on category pages. Any chances it could work?
Or would I have to turn it into a module?

thanks

Studio 42

YOu must active content plugin in
admin virtuemart>> config

Enable content plugin

svm

i have the newest version of vm2 and i found the button, but not all content plugins will be shown to the user....
Have someone else a simliar bug?

itmostro

Quote from: Electrocity on October 26, 2011, 22:44:23 PM
YOu must active content plugin in
admin virtuemart>> config

Enable content plugin

I check the option "Enable Joomla Plugin" in VM configuration, but I can't see the product detail yet...
I have to do some other operation?

thanks!

PRO

Quote from: svm on October 26, 2011, 23:53:43 PM
i have the newest version of vm2 and i found the button, but not all content plugins will be shown to the user....
Have someone else a simliar bug?


what plugin is it? and what triggers it?

DaffRider

HI all

I use Joomla 1.7 and VM 2.0

I modify some fields in product table for create VOD store

i use this great tutorial -> http://www.abemedia.co.uk/blog/tutorials/create-pay-on-demand-content-in-joomla-using-virtuemart-chameleon.html

My question is simple

OK product_desc ok for Content plugin but how and news elements for include this on rules:


if ( VmConfig::get('enable_content_plugin',0)) {
// add content plugin //
$dispatcher =& JDispatcher::getInstance();
JPluginHelper::importPlugin('content');
$product->text = $product->product_desc;
$params = "";

$results = $dispatcher->trigger('onPrepareContent',
array (& $product, & $params, 0));
$product->product_desc = $product->text;



I have 2 fields include in this code:

product_premium_content and product_premium_teaser

How modify code for include this fields of table ? like product_desc

I use allvideo plugins and only display in the product_desc, because he's only include in the rule :(

Thx lot of and sorry for my bad english (im french ^^)

David



mygbn

Im trying to get Core Design Magic Tabs plugin to work with V2 but the plugin is not showing in the product i have activated Both plugins needed and also ticked the box in Configuration/shop is there something that i have missed or is there any coding that needs to go into the default.php please help if i have missed anything.

Thank You

Studio 42

Hello daffrider,
Je suis aussi français.
pour utilisé un autre champs il suffit de lui indiquer le bon nom mais bien sur sans support HTML cela va être difficile d'ajouter un plugin dans un autre champs(a part dans category_desc)

HI all,
the code from daffrider can be used all table fields supporting html as category_description for eg.

Virtual

#11
Quote from: DaffRider on November 10, 2011, 13:40:30 PM
How modify code for include this fields of table ? like product_desc

I use allvideo plugins and only display in the product_desc, because he's only include in the rule :(

I have same problem. I added $this->editor->display to product_s_desc in /administrator/components/com_virtuemart/views/product/tmpl/product_edit_description.php and now I want to add this field to rule in /components/com_virtuemart/views/productdetails/view.html.php but I don't know how?

@Milbo please help! :( vm2.0.6

Virtual

Resolved:
<?php echo $this->product->product_s_desc JHTML::_('content.prepare'$this->product->product_s_desc); ?>

mhuebler

#13
anybody know how to use the conent plugin wthin vm product custom fields ?

EDIT

found finally a solution by customizing the product details template.

<?php 
$db 
JFactory::getDBO();
$query $db->getQuery(true);
$query->select('customfield_value');
$query->from('#__virtuemart_product_customfields');
$query->where('virtuemart_product_id="' . (int) $db->escape($this->product->virtuemart_product_id) . '"');
$query->where('virtuemart_custom_id="XXX"');
$db->setQuery($query);
$customfield_custom_display $db->loadResult();
if (
$customfield_custom_display != '')
echo 
$customfield_custom_display JHTML::_('content.prepare'$customfield_custom_display);
?>

PRO

Quote from: mhuebler on September 28, 2015, 15:44:03 PM
anybody know how to use the conent plugin wthin vm product custom fields ?

EDIT

found finally a solution by customizing the product details template.

<?php 
$db 
JFactory::getDBO();
$query $db->getQuery(true);
$query->select('customfield_value');
$query->from('#__virtuemart_product_customfields');
$query->where('virtuemart_product_id="' . (int) $db->escape($this->product->virtuemart_product_id) . '"');
$query->where('virtuemart_custom_id="XXX"');
$db->setQuery($query);
$customfield_custom_display $db->loadResult();
if (
$customfield_custom_display != '')
echo 
$customfield_custom_display JHTML::_('content.prepare'$customfield_custom_display);
?>



lol, why are you doing all this? these are already there

$field->virtuemart_custom_id

$field->customfield_value

No need to query the database for nothing.