Developer forum

Forum » Development » Problem when getting favorites list

Problem when getting favorites list

Rui Silva
Reply

Hi guys,

 

In the project that I'm working, we need to populate a select with all the favorites lists which were created by the logged user.

I'm using this code to get that list.

<select>
    @foreach(var listType in GetLoop("CustomerCenter.ListTypes")) {
        foreach(var list in listType.GetLoop("CustomerCenter.ListTypes.Lists")) {
            string optionName = String.IsNullOrEmpty(list.GetString("Ecom:CustomerCenter.ListTypes.List.Name")) ?   Translate("Default","Default") : list.GetString("Ecom:CustomerCenter.ListTypes.List.Name");
             <option value="@list.GetInteger("Ecom:CustomerCenter.ListTypes.List.ID")">@optionName</option>
         }
   }

</select>

 

In the front-end I'm just getting the select populated if I have a TemplateTags call in the page. I've recorded a screencast showing this issue: http://screencast.com/t/Q6m0jzdPfvo.

 

I'm using DW version 8.8.1.3.

 

Can someone help me with this?

 

Best,

Rui Silva

 


Replies

 
Nicolai Pedersen
Reply

In what template?

Using an Include?

 
Rui Silva
Reply

This is in the product detail template.

 
Rui Silva
Reply

This is in the product detail template.

No includes are used.

 
Rui Silva
Reply

bump

 

You must be logged in to post in the forum