Closed goben2489 closed 7 years ago
This is very interesting, but why would you even want an order with no items inside? Have you tried creating an order with at least a virtual item inside?
I doubt any of the behavior you seem to be relying on is covered by @api annotations, and I don't think it is symptomatic of any bugs neither. When doing a deep customization like that, you're largely on your own. The GitHub issue tracker is only intended for technical issues resulting from underlying bugs in the Magento software.
Please refer to the Community Forums or the Magento Stack Exchange for technical questions and advice regarding development.
because request from my customer, they want user can request a order but no item, they manage order by multi status, they want doing with user first by phone, after they add product and complete order.
I found resolve problem at Magento\Sales\Model\ResourceModel\Order
public function save(\Magento\Framework\Model\AbstractModel $object)
{
/** @var \Magento\Sales\Model\Order $object */
//$this->stateHandler->check($object); -> this is check order and replace complete if have not item
return parent::save($object);
}
@goben2489 please refer to the Community Forums or the Magento Stack Exchange site for advice or general discussion about this issue. The GitHub issue tracker is intended for Magento Core technical issues only.
Preconditions
Steps to reproduce
I try create order by manual with no item, have only customer info, payment and shipping but order create has stage complete, i think it check quote have item or total > 0 but i have not find it
` public function execute() { $post = $this->getRequest()->getPostValue(); $this->inlineTranslation->suspend(); try { $postObject = new \Magento\Framework\DataObject(); $postObject->setData($post); $last_name=trim($post['name']); $first_name=trim($post['vorname']); $company_name=trim($post['firma']); $email=trim($post['email']); $telephone=trim($post['telephone']); $comment=trim($post['comment']); $status="rueckruf";
}`
Expected result