Author Topic: Extending VM product content  (Read 1363 times)

dlesin

  • Beginner
  • *
  • Posts: 3
  • A beginner
  • Skype Name: dlesin
Extending VM product content
« on: January 14, 2017, 18:08:24 pm »
Hello!
Sorry if I'm wrong writing to this area of forum.
I'm trying to extend VM tool for my own purposes. I need to update product page on fly and print it together with categories and manufactures modules. I was trying to use a typical Joomla approach developing custom plugin called based on onContentPrepare event.
And I can get article content (to modify it on fly) everywhere in Joomla except for VirtueMart part which is called in a separate Joomla menu. Apparently, VM builds its own article content for Joomla not permitting do the same for any other plugins!
Can you please give me a brief recommend which way could be most effective to modify product content on fly without direct coding within VM? Is it possible, in general?
Thank you very much in advance!

PRO

  • Global Moderator
  • Super Hero
  • *
  • Posts: 10272
  • VirtueMart Version: 3+
Re: Extending VM product content
« Reply #1 on: January 14, 2017, 22:52:13 pm »
Hello!
Sorry if I'm wrong writing to this area of forum.
I'm trying to extend VM tool for my own purposes. I need to update product page on fly and print it together with categories and manufactures modules. I was trying to use a typical Joomla approach developing custom plugin called based on onContentPrepare event.
And I can get article content (to modify it on fly) everywhere in Joomla except for VirtueMart part which is called in a separate Joomla menu. Apparently, VM builds its own article content for Joomla not permitting do the same for any other plugins!
Can you please give me a brief recommend which way could be most effective to modify product content on fly without direct coding within VM? Is it possible, in general?
Thank you very much in advance!

When you say "print" do you mean to print it on a printer? Or ECHO ?

Why not make a vm customfield plugin.

You can sql "select" the joomla content via the plugin. Backend product, your form field could just be a select list of the joomla article.

I do NOT do development work for hire.

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2413
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3.0.x.y
Re: Extending VM product content
« Reply #2 on: January 14, 2017, 23:08:19 pm »
You can enable content plugin in VM, this should solve your problem if your plugin is a system or content plugin.
Perhaps you have to add some codes in your plugin if it not work

dlesin

  • Beginner
  • *
  • Posts: 3
  • A beginner
  • Skype Name: dlesin
Re: Extending VM product content
« Reply #3 on: January 15, 2017, 08:49:17 am »
When you say "print" do you mean to print it on a printer? Or ECHO ?

Why not make a vm customfield plugin.

You can sql "select" the joomla content via the plugin. Backend product, your form field could just be a select list of the joomla article.

Hi PRO,
Sorry, I was not clearly writing earlier. If more exactly, I created custom fields for products in VirtueMart such as next: "annotation", "auditory", "precondictions". They are now displayed in Web page together with description of a product. But I need to add some specific info to all these fields including the description one on fly. In this way, I already have custom fields but there are template products which contain info in fields which should be added to the first product.

dlesin

  • Beginner
  • *
  • Posts: 3
  • A beginner
  • Skype Name: dlesin
Re: Extending VM product content
« Reply #4 on: January 15, 2017, 09:18:38 am »
You can enable content plugin in VM, this should solve your problem if your plugin is a system or content plugin.
Perhaps you have to add some codes in your plugin if it not work

Hi Studio 42,
It works! Thank you!