gautamkakadiya Posted January 3, 2015 Share Posted January 3, 2015 Hello Everyone, I have created Attribute programmatically. and it is working fine. but now i want to create Product attribute combination for the particular product. please help me i am stuck here. i didn't found any solution. Thanx in advance. Link to comment Share on other sites More sharing options...
bhargavlalo Posted January 22, 2015 Share Posted January 22, 2015 You can use below code for create product combination. It may help you. $id_product=14;$id_language=1;$product = new Product($id_product, true, $id_language);// list of attribute value ids..$combinationAttributes[] = 2;$combinationAttributes[] = 5;if(!$product->productAttributeExists($combinationAttributes)){$price = 1;$weight = 100;$ecotax = 7;$unit_price_impact="";$quantity = 1;$reference = "";$supplier_reference = "";$ean13 = "";$default = false;$idProductAttribute = $product->addProductAttribute((float)$price, (float)$weight, $unit_price_impact, (float)$ecotax, (int)$quantity, "", strval($reference), strval($supplier_reference), strval($ean13), $default, NULL, NULL);$product->addAttributeCombinaison($idProductAttribute, $combinationAttributes);} [spam-filter]bhargavlalo 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now