VirtueMart Forum

VirtueMart 2 + 3 + 4 => Administration & Configuration => Topic started by: dr.scoop on January 31, 2012, 14:39:16 PM

Title: How to enable Joomla plugin on VM 2
Post by: dr.scoop on January 31, 2012, 14:39:16 PM
hi there...

after more than a whole day of searching and trying... my brain feels like a pot of jelly....   i hope somebody could help me out... somehow...

im using
-joomla 1.7
-vm 2.0

and the really great joomla plugin
-mp3 Browser

this nice joomla plugin is freeware and lists all mp3's in a folder with id3-tag.

i need to get this joomla plugin to work in prduct details in vm.

i found some older howto's for vm1.1.
http://www.plainlycode.com/Joomla/Joomla-Plugins-in-VirtueMart.html  (http://www.plainlycode.com/Joomla/Joomla-Plugins-in-VirtueMart.html)
http://duvien.com/blog/load-mambot-plugins-virtuemart (http://duvien.com/blog/load-mambot-plugins-virtuemart)

but i can't get it to work with vm2

in a simple joomla article i just need to use this tag for examle -> {music}media/dj-fresh{/music}


what do i need to do, for getting it to work?
is there maybe a extension for vm to use joomla plugins?

Title: Re: How to enable Joomla plugin on VM 2
Post by: jenkinhill on January 31, 2012, 15:46:58 PM
VM2.0.1b is fixed to allow Joomla plugins. Test on a backup copy.

http://dev.virtuemart.net/projects/virtuemart/files

And see http://forum.virtuemart.net/index.php?topic=96945.0
Title: Re: How to enable Joomla plugin on VM 2
Post by: dr.scoop on February 01, 2012, 11:22:25 AM
hi there...

thanks for your answer.

now, i've installed this 2 new files for update VM to 2.0.1b with the joomla extensions installer.

so far so good.  after installing, some product-images are missing now, but this isnt importend for me.

the checkbox for enabeling joomla extensions in the config-panel is still active.

if i put in the same tag, like in a joomla article, into pruduct details, it still shows this tag, and not the plugin.

could you tell me, where my problem ist. it looks, like it still doesn't work.

Title: Re: How to enable Joomla plugin on VM 2
Post by: jenkinhill on February 01, 2012, 16:09:05 PM
Sorry, I forgot I have a template override for the product details view. It is not fixed in 2.0.1b, but this is the fix:

In the file components\com_virtuemart\views\productdetails\view.html.php  (or the copy you are using for override)

Find:

if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onPrepareContent', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array (& $product, & $params, 0));


change to:

if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onContentPrepare', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array ('', & $product, & $params, 0));


Save the edited file and use it as a template override - http://forum.virtuemart.net/index.php?topic=90935.0

Then you can use the Joomla plugins in product details.
Title: Re: How to enable Joomla plugin on VM 2
Post by: Milbo on February 01, 2012, 16:31:44 PM
The fix is right for j1.7 but not for j1.5. Thanks for hint with changed trigger names: j.5 => onPrepareContent, but j1.7 => onContentPrepare.

The fix in the svn will be:

if(JVM_VERSION === 2 ) {
$results = $dispatcher->trigger('onContentPrepare', array ('com_virtuemart.productdetails',& $product, & $params, 0));
}
else {
$results = $dispatcher->trigger('onPrepareContent', array (& $product, & $params, 0));
}
Title: Re: How to enable Joomla plugin on VM 2
Post by: jenkinhill on February 01, 2012, 20:34:51 PM
Thanks, Milbo
Title: Re: How to enable Joomla plugin on VM 2
Post by: dr.scoop on February 02, 2012, 08:13:02 AM
thank you very much for this answer!

well, i'm a joomla newbie, and as a swiss guy, english isn't my native language, but.. i'm about to learn a lot from pro's like you.

thanks again...  even, if i didn't got it to work right now.

if i may ask a further question...

it seems, that i need to left the original vm-product detail-php unchanged, and put the changes you gave me into the override folders. should i left the original filename (view.html.php) or  do i have to rename it to "default.php"?
and how important for the functionality is the adjustement of the -template css, for showing me the joomla plug in the product-details page?

snowy-greetings from switzerland.
Title: Re: How to enable Joomla plugin on VM 2
Post by: Milbo on February 02, 2012, 17:11:48 PM
Just use the next 2.0.1.c
Title: Re: How to enable Joomla plugin on VM 2
Post by: dr.scoop on February 03, 2012, 07:52:42 AM
..ok., so it seems, that this here,
http://forum.virtuemart.net/index.php?topic=96945.0 (http://forum.virtuemart.net/index.php?topic=96945.0)

is what i'm looking for. ;-)
Title: Re: How to enable Joomla plugin on VM 2
Post by: dr.scoop on February 03, 2012, 08:57:35 AM
my config.


Plugin works fine in Joomla articles, but still dont work in VM ;-( .

sorry guys, for my stupid problem... but does anybody knows a alternative mp3 plug like that, whitch is working in VM?
i need that für my two ladies. they're managing the shop in the future, and they needs a simple tool, for putting CD-samples into the shop.

arctic greetings out from here.. (-17°C)
Title: Re: How to enable Joomla plugin on VM 2
Post by: jenkinhill on February 03, 2012, 11:01:04 AM
I am using Tiny MP3 from Joomlaxtc (http://www.joomlaxtc.com/index.php?page=shop.product_details&flypage=jextension.tpl&product_id=282&category_id=3&option=com_virtuemart&Itemid=98&Itemid=885). Works fine J2.5.1 VM2.0.1c
Title: Re: How to enable Joomla plugin on VM 2
Post by: dr.scoop on February 03, 2012, 11:50:39 AM
thanks jenkinhill,

i'm gona try it right now.

...and your player looks nice, and btw, im using flash for many years now...  i've made a player like this by myself (it plays all mp3's from a folder with showing id3-tags).....

but...  and ther's the point...  i whould like to keep the page as compatible as possible for all mobile phones (including st***-apple non flash playing phone)...  and i'm searching something non-flash-thing... like the mp3browser....

btw, i've installed joomla 2.5.1 right now, and get vm installed...

and my beloved mp3browser still works in articles... even not in the shop (VM 2.0.1c)

i just see the code, not the plug, like bevor in j1.7 aand VM2.01c

...where is the joomla text filter option gone in j 2.5.1???