Jump to content

Show Attribute Combinations For A Certain Product


Fusiondevs

Recommended Posts

Hi,

 

I built my own module that creates an array of all the products (so then i can loop on it with smarty) but i need each product to also include its attribute combinations. I cant find the function to get this. My actual code is the following...

 

function hookHome($params) {
global $smarty;
$category = new Category(5, Configuration::get('PS_LANG_DEFAULT'));
$products = $category->getProducts((int)($params['cookie']->id_lang), 1, 100);

for ($i = 0; $i < count($products); $i++) {
 /* Here i need to save the attribute combination for each of the products in the array */
}
//print_r($products);

$smarty->assign(array(
 'products' => $products
));
return $this->display(__FILE__, 'template.tpl');
}

 

I was checking on the Product class and i found the function getAttributeCombinaisons, but honestly i cant seem to understand how to use it.

 

Any help will be greatly appreciated,

 

Kind regards

Bruno

  • Like 1
Link to comment
Share on other sites

  • 7 months later...

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