News:

Support the VirtueMart project and become a member

Main Menu

How to enable Joomla plugin on VM 2

Started by dr.scoop, January 31, 2012, 14:39:16 PM

Previous topic - Next topic

dr.scoop

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://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?


jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

dr.scoop

#2
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.


jenkinhill

#3
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.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

Milbo

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));
}
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

dr.scoop

#6
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.

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

dr.scoop

#8
..ok., so it seems, that this here,
http://forum.virtuemart.net/index.php?topic=96945.0

is what i'm looking for. ;-)

dr.scoop

#9
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)

jenkinhill

Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

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

dr.scoop

#11
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???