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

Shopper plugin abstract error

Started by craftyweb, April 03, 2013, 14:45:14 PM

Previous topic - Next topic

craftyweb

Hi, I'm trying to make a shopper plugin to manipulate orders using plgVmOnUserOrder.

I'm getting the following error which I cannot figure out how to fix, any advice appreciated:
QuoteClass plgVmShopperOrdermodify contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (vmShopperPlugin::plgVmOnUpdateOrderBEShopper)

Plugin file:

<?php
defined
('_JEXEC') or  die( 'Direct Access to ' basename__FILE__ ) . ' is not allowed.' ) ;

if (!
class_exists('vmShopperPlugin')) require(JPATH_VM_PLUGINS DS 'vmshopperplugin.php');

abstract class 
plgVmShopperOrdermodify extends vmShopperPlugin {

// private $stockhandle = 0;

function __construct(& $subject$config) {
parent::__construct($subject$config);
}


private function plgVmOnUserOrder(&$_orderData)
{

// code ....

return $_orderData;
}


}
Joomla: 2.5.20
VirtueMart 2.0.26d

craftyweb

Never mind, seems I just needed this code in the plugin:

// re-implement to fix abstract error
public function plgVmOnUpdateOrderBEShopper($_orderID){

}


Strange as I'm pretty sure I tried this, must have had another error also!
Joomla: 2.5.20
VirtueMart 2.0.26d