load with url vmshipment plugin(AJAX)

Started by revo1, April 09, 2012, 14:48:10 PM

Previous topic - Next topic

revo1

HeY!
I just want to know it's possible to load vmshipment plugin called asd with url like that:
index.php?option=com_virtuemart&task=asd&view=function_in_asd_plugin&var1=something&var2=something_else

I want make ajax load for my plugin, but i have this plugin load problem.
scenario:
if i select something in first selection menu, then appear other and i can select there some values.


Thanks!

Milbo

Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

Studio 42

To ajaxify your plugin you must always use same "entry"
for eg.

JURI::root().'index.php?option=com_virtuemart&view=plugin&type=vmshipment&name=YOURPLUGINNAME&my_id=10&myparam=test ......

explain :
type=vmshipment  :  because is shipment
name=YOURPLUGINNAME  : because you want call your plugin
you must include in your plugin a function

function plgVmOnSelfCallFE($type, $name, &$render) {
if ($name != $this->_name || $type != 'vmshipment') return false;
// my nice code here
$render="mytext to render";
}

plgVmOnSelfCallFE is in FE

plgVmOnSelfCallBE is in BE
if you want it in json format, you must simply add format=json in the url(or in post);



revo1

Fatal error: Class 'VirtuemartControllerPlugin' not found in ...../virtuemart.php line 70:

Line 70:
$_class = 'VirtuemartController'.ucfirst($_controller);


where i can find this class?