News:

Looking for documentation? Take a look on our wiki

Main Menu

Support for content plugins

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

Previous topic - Next topic

mhuebler

Quotelol, 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.

thank you for sharing :-)

Milbo

soo?

<?php 
if ($field->customfield_value != '')
echo 
$customfield_custom_display JHTML::_('content.prepare'$field->customfield_value);
?>


Btw, there is a small problem in vm3.0.10 with the content plugins with the ajax reload. Is fixed, version will follow
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

istvixs

Hi!
Please help!
This code which file and where to insert?

GJC Web Design

where ever u want the custom field to appear.. normally your product details template
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

Quote from: istvixs on August 08, 2016, 21:49:01 PM
Hi!
Please help!
This code which file and where to insert?
This depend what field you want to trigger the content plugin.

istvixs

Hi!
Thank You quick answer. I want to use two places:
1, vm short description
2, Custom Fields string, editor, textarea.
I use t3_bs3_blank template.

Studio 42

For the "core" customfield, you need to overide YOURSITE\components\com_virtuemart\sublayouts\customfield.php and add directly your code inside function renderCustomfieldsFE to add content plugin for selected types(editor,textarea...).
Another solution is overide YOURSITE\components\com_virtuemart\sublayouts\customfields.php and check the customfield type and only for some positions(it's better to not trigger plugin when not needed).

istvixs

Thanks for the help!

(Back to the forum I read the product_s_desc works well Thanks!)

I want you to custom fields independently of the position (normal, on top, addToCart, filter) any type or all type (string, text area, editor) would work with Joomla content plugins. Please step by step.

Studio 42

See https://docs.joomla.org/Triggering_content_plugins_in_your_extension for the generic way to do it. All the other info was already explained in the messages before.

istvixs

Thanks for the help!

I am doing so:


/* text area or editor No vmText, only displayed in BE */
case 'X':
case 'Y':
$customfield->display = JHTML::_('content.prepare', $customfield->customfield_value);

break;


I only have one problem. If you choose child products with dropdown list, content plugin does not work. If html page reload, it works. (ajax reload problem?)

istvixs

If disable virtuemart settings Use ajax for product content, everything is alright. Ajax can be solved?

Milbo

Which version do you use? it should be solved since vm3.0.10
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/