From ead84aa9ff0ff41a8d843331eaeab648272172c2 Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Thu, 18 Dec 2014 11:00:45 +1100 Subject: [PATCH] Add ids to product listing products and variants --- app/views/shop/products/_form.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/shop/products/_form.html.haml b/app/views/shop/products/_form.html.haml index ef44a133eb..d86527a37f 100644 --- a/app/views/shop/products/_form.html.haml +++ b/app/views/shop/products/_form.html.haml @@ -17,11 +17,11 @@ %div.pad-top{bindonce: true} %product.animate-repeat{"ng-controller" => "ProductNodeCtrl", - "ng-repeat" => "product in filteredProducts = (Products.products | products:query | taxons:activeTaxons | orderBy:ordering.order) track by product.id "} + "ng-repeat" => "product in filteredProducts = (Products.products | products:query | taxons:activeTaxons | orderBy:ordering.order) track by product.id ", "id" => "product-{{ product.id }}"} = render partial: "shop/products/summary" - %shop-variant{variant: 'product.master', "bo-if" => "!product.hasVariants"} - %shop-variant{variant: 'variant', "ng-repeat" => "variant in product.variants track by variant.id"} + %shop-variant{variant: 'product.master', "bo-if" => "!product.hasVariants", "id" => "variant-{{ product.master.id }}"} + %shop-variant{variant: 'variant', "ng-repeat" => "variant in product.variants track by variant.id", "id" => "variant-{{ variant.id }}"} %product{"ng-show" => "Products.loading"} .row.summary