Developer forum

Forum » Templates » ProductList Loop in Loop

ProductList Loop in Loop

Keld Gøtterup
Reply

i have af productlist where i need to get access to the product.prices loop, unfortunateley it seems like im only able to get this on the product template and not the productlist.
it is available i templatetags.

The example below always shows 0 at i.GetLoop("Product.Prices").Count even though the products has multiple pricelines in the backend.

is this a bug or am i doing something wrong?


 

    foreach (LoopItem i in GetLoop("Products")){

    @:<div class="col-xs-6 col-md-4 product">
   
    @:    <h4>@i.GetValue("Ecom:Product.Name")</h4>
@i.GetString("Ecom:Product.ID")
@i.TemplateTags()
@* GetLoop fejl *@
@: <br />
@i.GetLoop("Product.Prices").Count


        @: <div class="btn-holder">
        @:     <a href="@(i.GetValue("Ecom:Product.Link.Clean"))" class="btn btn-success">Se produkt</a>
        @: </div>
    @:  </div>

    }


Replies

 
Nicolai Høeg Pedersen
Reply

Hm, it seems like it should work. I've asked a developer to take a look.

Which version?

BR Nicolai

 
Keld Gøtterup
Reply

 8.4.1.21

 
Oleg Rodionov
Reply
This post has been marked as an answer

Hi all,

I've checked the code in product list's template on the following DW versions:

8.4.0.21 - OK;

8.4.1.19 - FAIL;

8.4.1.21 - FAIL;

8.5.0.0   - OK;

8.6.1.0   - OK

So, the bug was fixed on an version higher than 8.4.1.21, update of DW is required in the case.

BR, Oleg QA

Votes for this answer: 1

 

You must be logged in to post in the forum