bonjour,
je suis entrain d'afficher des produits selon catégories, lorsque je sélectionne un produit je l'ajoute au panier sous leur catégorie (avec ajax)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 
if($('#cart_block dt#cart_block_product_'+ domIdProduct ).length == 0)
				{
 
					var productId = parseInt(this.id);
					var productAttributeId = (this.hasAttributes ? parseInt(this.attributes) : 0);
					var content =  '<dt class="hidden" id="cart_block_product_' + domIdProduct + '">';
						 content += '<span class="quantity-formated"><span class="quantity">' + this.quantity + '</span>x</span>';
						 var name = (this.name.length > 12 ? this.name.substring(0, 10) + '...' : this.name);
						  content += '<a href="' + this.link + '" title="' + this.name + '">' + name + '</a>';
						  content += '<span class="remove_link"><a rel="nofollow" class="ajax_cart_block_remove_link" href="' + baseDir + 'cart.php?delete&amp;id_product=' + productId + '&amp;token=' + static_token + (this.hasAttributes ? '&amp;ipa=' + parseInt(this.idCombination) : '') + '"> </a></span>';
						  content += '<span class="price">' + this.priceByLine + '</span>';
						  content += '</dt>';
					if (this.hasAttributes)
						  content += '<dd id="cart_block_combination_of_' + domIdProduct + '" class="hidden"><a href="' + this.link + '" title="' + this.name + '">' + this.attributes + '</a>';
					if (this.hasCustomizedDatas)
						content += ajaxCart.displayNewCustomizedDatas(this);
 
					if (this.hasAttributes) content += '</dd>';
                                       $('#cart_block dl.products').append(content);
 
				}
dans la partie vue , jai deux boucles for (une pour catégories ett l'autre pour produit) , alors là la ligne s'ajoute 4 fois ...mais je veux ajouter la igne au catégorie correspondant
merci