Hi,
I was trying to integrate a third party library related to order.
I need to fetch previous order placed customer prior to current order.
MySQL query is
Code:
SELECT order_id FROM `xc_orders` WHERE orig_profile_id=7 AND is_order=1 AND order_id!=11 ORDER BY order_id DESC LIMIT 1
This is my code.
Code:
$condition = array('orig_profile' => 7, 'is_order'=>1, 'order_id!='=>11);
$lastOrderInfo = \XLite\Core\Database::getRepo('XLite\Model\Order')->findOneBy($condition);
return $lastOrderInfo->orderNumber;
But I'm getting "
Unrecognized field: is_order" error. How to fix this error.