Hello,
I use a db query to check if a user purchased a product
$query->select('count(op.order_product_id)')
->from('#__hikashop_user AS u')
->leftJoin('#__hikashop_order AS o ON u.user_id = o.order_user_id')
->leftJoin('#__hikashop_order_product AS op ON op.order_id = o.order_id')
->where('u.user_cms_id = ' . (int)$user->id)
->where('op.product_id IN (' . implode(',', array_map('intval', (array)$productIds)) . ')')
->where("o.order_status = 'confirmed'");
question:
how do I add another order status to the last line?
I want the query to return a true value also for the status with namekey
confirmedinvoice
I just do it like this?
->where("o.order_status = 'confirmed,confirmedinvoice'");
thank you