Developer forum

Forum » Ecommerce - Standard features » CustomerCenter IsProductInThisList

CustomerCenter IsProductInThisList

António Ramos
Reply

Hi guys,

We have an issue in product detail when getting information if the product is currently at the Custom List.

In the template the value from the tag GetBoolean("Ecom:Product.List.IsProductInThisList") is always False but when we put the @TemplateTags the value changes (correctly) to True.

DW version: 8.8.0.0

Best regards,

António Ramos

 


Replies

 
Nicolai Høeg Pedersen
Reply

We need to see all the template code please...

 
António Ramos
Reply

Hi Nicolai,

Just sent to your email.

Best regards,

António Ramos

 
Nicolai Høeg Pedersen
Reply

You can post the code here, please.

 
António Ramos
Reply

Here you go

Thanks

 
Nicolai Høeg Pedersen
Reply

Try to use GetString instead of GetBoolean and see what comes out of that?

 
Nicolai Høeg Pedersen
Reply
This post has been marked as an answer

Well, and your code does not look like 'normal' rendering of a loop in Razor:

if (collectedLists.Count > 0)
  {
    List<LoopItem> lists = collectedLists[0].GetLoop("CustomerCenter.ProductLists");
    if(lists.Count > 0){
      bol_collected = lists[0].GetBoolean("Ecom:Product.List.IsProductInThisList");
    }
  }

I'm not sure you are in the right context here.

Votes for this answer: 1
 
António Ramos
Reply

Hi Nicolai,

You are right maybe i was in a diferent context. It works now... I changed the previous code to:

foreach(var collectedLists in GetLoop("CustomerCenter.Lists.Type.Collected"))
  {
    foreach(var lists in collectedLists.GetLoop("CustomerCenter.ProductLists"))
    {
      bol_collected = lists.GetBoolean("Ecom:Product.List.IsProductInThisList");
    }
  }

Thanks,

Best regards,

António Ramos

 

You must be logged in to post in the forum