Hi,
To know if the user have bought the product ; you need to perform a SQL query on the table "order" joined with the table "order_product".
By using the function "hikashop_loadUser(false)" you can retrieve the current HikaShop user id ; that id will be useful for the query on the table "order", for the field "order_user_id".
About the product, you will be able to find it in the table "order_product" in the field "product_id" and the field "order_id" should be use for the join between the table "order" and the table "order_product".
In order to be sure that the user have bought the product and not just create an order with that product into ; you also need to filter the orders on the order_status ; it could be also useful to only retrieve the orders with an "order_type" set to "sale".
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.