I have a problem on the configuration page that might be related to the error page I described in previous post.
If I have this code in the _configuration.php
<tr>
<td class="key">
<label for="data[payment][payment_params][order_status]">
<?php echo JText::_( 'ORDER_STATUS' ); ?>
</label>
</td>
<td>
<?php echo $this->data['category']->display("data[payment][payment_params][order_status]",@$this->element->payment_params->order_status); ?>
</td>
</tr>
I get this error when trying to go in to the settings of the payment plugin:
Order status
Notice: Undefined index: category in /mydomain/plugins/hikashoppayment/auriga/auriga_configuration.php on line 96
Fatal error: Call to a member function display() on a non-object in /mydomain/plugins/hikashoppayment/auriga/auriga_configuration.php on line 96
Line 96 being this code from above:
<?php echo $this->data->display("data[payment][payment_params][order_status]",@$this->element->payment_params->order_status); ?>
In the pluginfile I have this in the onPaymentConfiguration function:
function onPaymentConfiguration(&$element){
$this->auriga = JRequest::getCmd('name','auriga');
if(empty($element)){
$element = null;
$element->payment_name='Auriga';
$element->payment_description='Du kan betala med kort eller genom direktbetalning i din bank.';
$element->payment_images='MasterCard,VISA';
$element->payment_type=$this->auriga;
$element->payment_params=null;
$element->payment_params->notification=1;
$element->payment_params->order_status='confirmed';
$element = array($element);
}
$bar = & JToolBar::getInstance('toolbar');
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
JToolBarHelper::divider();
$bar->appendButton( 'Pophelp','payment-auriga-form');
hikashop::setTitle('AURIGA','plugin','plugins&plugin_type=payment&task=edit&name='.$this->auriga);
$app =& JFactory::getApplication();
$app->setUserState( HIKASHOP_COMPONENT.'.payment_plugin_type', $this->auriga);
$this->address = hikashop::get('type.address');
$this->category = hikashop::get('type.categorysub');
$this->category->type = 'status';
}
Apparently I have missed something, but what? The order_status setting code is copied from the banktransfer plugin.
Jan