- Posts: 71
- Thank you received: 1
Create full product with variants in php
10 years 2 months ago #247921
by RG
Create full product with variants in php was created by RG
-- HikaShop version -- : 3.5
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.5.2
Hey,
Can you provide some example code where you create a product and a variants with specific from php code?
Thanks,
RG
-- Joomla version -- : 3.6.2
-- PHP version -- : 5.5.2
Hey,
Can you provide some example code where you create a product and a variants with specific from php code?
Thanks,
RG
Please Log in or Create an account to join the conversation.
10 years 2 months ago #247925
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Create full product with variants in php
Hi,
Here some code to create a 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,
Here some code to create a product :
Code:
$product = new stdClass();
$product->product_code = 'my product code';
$product->product_quantity = -1;
$productClass = hikashop_get('class.product');
$productClass->save($product);
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Time to create page: 0.039 seconds