Hi,
Here some code to create a product :
$product = new stdClass();
$product->product_code = 'my product code';
$product->product_quantity = -1;
$productClass = hikashop_get('class.product');
$productClass->save($product);
For the variant part, it is far more complicated and I can't provide you any example code ; the easier would be to read directly the HikaShop source code for the product class.
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.