HI: I am unable to create object of a class in vm version 2.0.6

Started by deepak_wg, May 09, 2012, 13:21:09 PM

Previous topic - Next topic

deepak_wg

HI,

i like to create object of a class "VirtueMartControllerVirtuemart"

   if(!class_exists('VirtueMartControllerVirtuemart')) require(JPATH_VM_SITE.DS.'controllers'.DS.'virtuemart.php');


      $controller = new VirtueMartControllerVirtuemart();

but it gives me error


<br /><b>jos-Error</b>: Application Instantiation Error<br />
<br />
require_once() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_ecc/virtuemart.php:168<br />
WgCommon -> parseRequest() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_ecc/lib/D.virtuemart2.php:2255<br />
virtuemart -> UpdateOrdersShippingStatus() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_ecc/lib/D.WgCommon.php:77<br />
shopFunctionsF -> renderMail() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_ecc/lib/D.virtuemart2.php:1735<br />
VirtueMartControllerVirtuemart -> __construct() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_virtuemart/helpers/shopfunctionsf.php:182<br />
JController -> __construct() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_virtuemart/controllers/virtuemart.php:34<br />
JController -> setPath() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/controller.php:418<br />
JController -> addPath() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/controller.php:1099<br />
JPath :: check() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/controller.php:458<br />
JError :: raiseError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/filesystem/path.php:183<br />
JError :: raise() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:251<br />
JError :: throwError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:176<br />
JError :: handleMessage() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:214<br />
JFactory :: getApplication() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:705<br />
JError :: raiseError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/factory.php:99<br />
JError :: raise() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:251


i like to know the procedure of calling  any class method in virtue mart 2.0.6

please HELP!!!!!

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/

deepak_wg

HI,

Thank you very much for your kind help.

But till now i am unable to proceed further because whenever new object is created  its construct is get called and it raised error.


virtuemart -> Update OrdersStatus() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_acc/lib/Common.php:77<br />
JController -> getView() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/components/com_acc/models/acc.php:1835<br />
JController -> createView() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/controller.php:892<br />
JView -> __construct() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/controller.php:649<br />
JView -> _setPath() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/view.php:262<br />
JFactory :: getApplication() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/application/component/view.php:795<br />
JError :: raiseError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/factory.php:99<br />
JError :: raise() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:251<br />
JError :: throwError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:176<br />
JError :: handleMessage() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:214<br />
JFactory :: getApplication() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:705<br />
JError :: raiseError() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/factory.php:99<br />
JError :: raise() @ /var/www/cart/httpdocs/Joomla_2_5_4_vm_2_0_6/libraries/joomla/error/error.php:251


It would be great help if  you tell me how to do so.


i want to call  renderMail method  and in this method whenever any class is create object it gives error.

shopFunctionsF::renderMail('invoice', $orderData['details']['BT']->email, $vars, null,$vars['doVendor']);