-- url of the page with the problem -- :
www.121time.com
-- HikaShop version -- : 4.0.1
-- Joomla version -- : 3.9.1
Good evening,
Our customer create custom and unique watches with an online configurator. We use the following code to pass a few attributes to the new product:
$productClass = hikashop_get('class.product');
$product = new stdClass();
$product->product_name = $watchName;
$product->product_code = $watchId;
$product->product_msrp = $watchPrice;
$product->product_published = 1;
$product->product_quantity = 1;
$product->product_tax_id = 11;
$product->product_warehouse_id = 1;
$product->categories = array(47);
$result = $productClass->save($product);
The creation of the product is correctly made, but we can't add to the new created products the same existing category, in our case the category id 47
Is there anyway to add a product in a category (table product_category)?
Thank you for your help
Jean-Loup