News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

WYSIWYG or docman link in a custom field

Started by Tkheun, November 24, 2016, 09:03:47 AM

Previous topic - Next topic

Tkheun

Hi everyone!

Could someone tell me how can I use customfield to link docman file to VM product? I tried to create an editor typed field but it doesn't show WYSIWYG editor buttons like 'insert module' or 'insert pagebrake' (in my case it is 'insert document' button required).

K&K media production

There are no editor buttons. But you can use your Joomla Content Plugins (if enabled in main config). The only thing is, you must insert the plugin code manually. I dont't know which code is inserted with "insert document", but you can look on your joomla articles how the inserted code looks like and copy the code inside your virtuemart editor.

But if you only want to add a document to your product, it should be simplier to use a attachment custom field like
http://extensions.virtuemart.net/product/products/attachment-for-virtuemart-detail
https://www.wdmtech.com/hexsys-virtuemart-product-attachment-plugin
...there are many plugins available

Tkheun

Quote from: K&K media production on November 25, 2016, 14:09:44 PM
There are no editor buttons.
But why? Everywhere else like in product description, or category decription there are buttons under the editor field. Why can't I use them in a custom filed? Is there a restriction of any kind?

Studio 42

You can use a customfield, but this not solve the insert document link.
VM remove the editor plugins, because pagebreak is not available in products. But on doing this, it's not possible to display other button as insert document in the editor.

Tkheun

Ok, I get it. There is reasonable limitation.

So, this is a docman link '/administrator/index.php?option=com_docman&view=doclink&e_name=jform_articletext&tmpl=koowa' I need to insert everytime when a product is created. (Obviously excluding [&e_name=jform_articletext] part, but I don't know whether it necessary or not). Is there a way to insert it with a button of some kind?

Studio 42

A solution is to pen a Joomla article, thne insert the code in the article.
Copy the generated code and paste it in the Virtuemart editor.

Tkheun

Quote from: Studio 42 on November 27, 2016, 11:17:32 AM
A solution is to pen a Joomla article, thne insert the code in the article.
Well, with all due respect, this is not a solution. It might be, if you you need to link a few docs to couple products. But when you you need to create several hundred or thousand products with 3-4 links to docs each, that is defenitly NOT a solution.

Studio 42

Quote from: Tkheun on November 27, 2016, 13:09:20 PM
Quote from: Studio 42 on November 27, 2016, 11:17:32 AM
A solution is to pen a Joomla article, thne insert the code in the article.
Well, with all due respect, this is not a solution. It might be, if you you need to link a few docs to couple products. But when you you need to create several hundred or thousand products with 3-4 links to docs each, that is defenitly NOT a solution.
Of course, in this case it's better to develop and use a customfield plugin perhaps ?
Another solution is to add the javascript in the editor or overide the product edit view in the template to load the editor directly for your needs.

Tkheun

Quote from: Studio 42 on November 27, 2016, 14:47:16 PM
Of course, in this case it's better to develop and use a customfield plugin perhaps ?
Another solution is to add the javascript in the editor or overide the product edit view in the template to load the editor directly for your needs.
I wish I knew how to do that :)