Thank you very much. O.K, I got that
There is a function markAsOrder in the Model/Repo/Cart.php
which is used in Model/Cart.php
Code:
/**
* Mark cart as order
*
* @return void
*/
public function markAsOrder()
{
parent::markAsOrder();
if ($this instanceof \XLite\Model\Cart) {
$this->assignOrderNumber();
}
$this->getRepository()->markAsOrder($this->getOrderId());
}
which in turn is called in Model/Order.php
Code:
public function processSucceed()
{
$this->markAsOrder();
....
So I presume I only would have to modify somewhere in the chain the value of is_order, I am done? And probably the simplest thing is to decorate Model/Order.php to have something like
Code:
public function processSucceed()
{
if (!isFake()) {
$this->markAsOrder();
}
....
And maybe to be on the safe side, I can add couple of lines to set is_order=0 when I have a fake order?