Author Topic: Support for content plugins  (Read 8884 times)

mhuebler

  • Jr. Member
  • **
  • Posts: 54
    • 3D-Puzzlewelt
  • VirtueMart Version: 3.2.x
Re: Support for content plugins
« Reply #15 on: September 29, 2015, 11:17:52 am »
Quote
lol, 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

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Support for content plugins
« Reply #16 on: September 30, 2015, 23:14:22 pm »
soo?

Code: [Select]
<?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
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

istvixs

  • Beginner
  • *
  • Posts: 9
Re: Support for content plugins
« Reply #17 on: August 08, 2016, 21:49:01 pm »
Hi!
Please help!
This code which file and where to insert?

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9228
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Support for content plugins
« Reply #18 on: August 08, 2016, 21:53:25 pm »
where ever u want the custom field to appear.. normally your product details template
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 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
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Support for content plugins
« Reply #19 on: August 08, 2016, 22:59:47 pm »
Hi!
Please help!
This code which file and where to insert?
This depend what field you want to trigger the content plugin.

istvixs

  • Beginner
  • *
  • Posts: 9
Re: Support for content plugins
« Reply #20 on: August 09, 2016, 07:46:10 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Support for content plugins
« Reply #21 on: August 09, 2016, 10:45:02 am »
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

  • Beginner
  • *
  • Posts: 9
Re: Support for content plugins
« Reply #22 on: August 12, 2016, 08:18:37 am »
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

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 4067
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Support for content plugins
« Reply #23 on: August 12, 2016, 10:58:15 am »
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

  • Beginner
  • *
  • Posts: 9
Re: Support for content plugins
« Reply #24 on: September 08, 2016, 18:27:23 pm »
Thanks for the help!

I am doing so:

Code: [Select]
/* 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

  • Beginner
  • *
  • Posts: 9
Re: Support for content plugins
« Reply #25 on: September 09, 2016, 10:24:35 am »
If disable virtuemart settings Use ajax for product content, everything is alright. Ajax can be solved?

Milbo

  • Virtuemart Projectleader
  • Administrator
  • Super Hero
  • *
  • Posts: 9997
  • VM3.2 Cached and Optimized
    • VM3 Extensions
  • VirtueMart Version: VirtueMart 3 on joomla 3
Re: Support for content plugins
« Reply #26 on: September 12, 2016, 19:33:25 pm »
Which version do you use? it should be solved since vm3.0.10
I should fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/