Rehi,
OK, I am some steps further...
I created a new order status "Requested" at the beginning of the workflow.
Just as a test, I created a new order and manually set the status to "Requested".
When the customer now logs in and browses his orders he sees this:
Which is exactly what I want: The order cannot be paid for yet
Now the shop owner can process the request, and after adding shipping costs (and maybe some bonuses) he can set the status to "Created" which makes the order payable.
So all I want now is to change the initial status of the order from "Created" to "Requested", and everything should work, right? Or can I expect other stuff to not work anymore (like the automatic emptying of the cart) because of this new initial status?
I am no PHP-wizz (yet), but can someone give an example of how the plugin code for this would look like?
Beneath trial does not work because the status still remains "Created"...
class plgHikasshopRFP extends JPlugin {
function plgHikasshopRFP(&$subject, $config){
parent::__construct($subject, $config);
}
// Change the initial order status
function onBeforeOrderCreate(&$order,&$send_email){
$order->order_status = "requested";
return $this->onBeforeOrderCreate($order,$send_email);
}
}
TIA,
Peter