Jump to content

[1.7] Product combinations


knacky
 Share

Recommended Posts

Hello.
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)

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More