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

custom field plug-ins - does not get the list of plug-ins

Started by ydl, December 07, 2015, 08:39:21 AM

Previous topic - Next topic

ydl

I create a custom plug-in.

The plug-in constructor is invoked BUT non of other functions.

I understood from the docs that I have to define the plug-in in the custom field, so I tried to setup a new custom field of the type plug-ins BUT the list of plug-ins didn't apear

Can anyone point out to a document or explain how to use it?

Thank in advance!

GJC Web Design

as soon as I install any vmcustom plugin it is available in the customfields "Additional Parameters" if I choose type plugin

is your xml correct

e.g.   <extension method="upgrade" version="1.5" type="plugin" group="vmcustom" >

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

ydl

Now I see it...

I add some "echo" to see if I reach the plug-ins function... only the constructor is reach...

The functions:
- plgVmOnViewCart
- plgVmOnViewCartVM3
- plgVmOnDisplayProductFE
etc.
are never reach !?

Any sugestion how to debug it?

GJC Web Design

#3
what do u mean reached?

if your syntax is correct the function is triggered when called by the dispatcher

do a general file search for functions

e.g. in customfields  model

if (!class_exists ('vmCustomPlugin')) {
            require(VMPATH_PLUGINLIBS . DS . 'vmcustomplugin.php');
         }

         if ($customfield->field_type == "E") {

            JPluginHelper::importPlugin ('vmcustom');
            $dispatcher = JDispatcher::getInstance ();
            $ret = $dispatcher->trigger ('plgVmOnDisplayProductFEVM3', array(&$product, &$customfields[$k]));
            continue;
         }

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

ydl

When I wrote 'reach' I meant 'trigger'...

What I see now is that the plug-ins functions a triggered in the back-end BUT not in the front-end

Did I missed something?

GJC Web Design

the FE uses the BE models..

there are some triggers for the FE in the helpers & views FE

just do a general search for "plgVm"
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

ydl

Quotethe FE uses the BE models..
I know...
Quotethere are some triggers for the FE in the helpers & views FE
I check the plugin that come with the system - 'specification' - I check 'plgVmOnDisplayProductFE' witch exist in the code and added my own 'plgVmOnDisplayProductFEVM3' - none of them reach in the FE

I also put a print in "VirtueMartCustomFieldRenderer::renderCustomfieldsFE" and it does not trigger in FE!!!