Jump to content

[1.7] Product combinations


Recommended Posts

I need advice on add / update product combinations.

$id_product = 12345;

$attributes = array(1,2,3,20,21,22); // id_attribute in ps_attribute.id_attribute
/* 1 - 3 = size, 20 - 22 = color */
/* all attributes in databse exists */

$product = new Product((int) $id_product);

$combinations = array();
$combinations[] = ??????????????????????;

$resetExistingCombination = true;

$product->generateMultipleCombinations($combinations, $attributes, $resetExistingCombination);

How to correctly add values to the generateMultipleCombinations function?
Thank you

Edited by knacky (see edit history)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...