Seb Posted June 5, 2008 Share Posted June 5, 2008 Bonjour, Je me suis aperçu que sans JacaScript, le choix des déclinaisons de produit n'était pas possible car ça prend la déclinaison par défaut. J'ai un peu modifié le code de l'ajout d'un produit mais ce n'est qu'une ébauche de travail qui semble fonctionner. Dans le : elseif ($producToAdd->hasAttributes() AND !$delete) if(empty($idProductAttribute)) { $attributeArray = array(); foreach($_POST as $k => $v) { if(ereg("^group_([0-9]+)$",$k,$regs)) $attributeArray[$v] = $v; } $attributesGroups = $producToAdd->getAttributesGroups(intval($cookie->id_lang)); if (Db::getInstance()->numRows()) { foreach ($attributesGroups AS $k => $row) { $combinations[$row['id_product_attribute']][intval($row['id_attribute'])] = intval($row['id_attribute']); } } $idProductAttribute = array_search($attributeArray, $combinations); if (!$idProductAttribute) $idProductAttribute = Product::getDefaultAttribute(intval($producToAdd->id)); } Juste une piste de travail. A bientôt Seb 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