How to insert data into node and other tables at the same time?
Why you are using custom code to store the records in the node table. Are you calling any API service or you creating form yourself? 

If you have created content type, then just go with drupal way and call custom submit function to store products and price values in a separate table by using db_write_record() or db_insert() function to insert the record in the database. 

Just go through the below link

https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_write_record/7
https://www.drupal.org/node/310079