Developer forum

Forum » Ecommerce - Standard features » GetLoop("Details") returns one empty node if the list is empty

GetLoop("Details") returns one empty node if the list is empty

Adrian Ursu
Reply

Hi Guys,

It looks like after ugrading to 8.4.1.25 (have not noticed this before the upgrade but this does not mean it was not there) the GetLoop("Details") returns one empty node.
Meaning that  @foreach (LoopItem i in GetLoop("Details")){ @ i.GetString("Ecom:Product:Detail.Image.Clean") } will return one empty node.

Any ideea?

Thanks,
Adrian


Replies

 
Viktor
Reply

Greetings.

We really appreciate your appeal and will try to do anything to help you.

I've looked into your problem, but looks like the information that you provide is not enough for helping you to solve the problem. I've create product and some details for it (see attached screen 1). I've extend standart template for support details loop(see attached cshtml template): 

@{ var html = "";
foreach (LoopItem i in GetLoop("Details")){ html+= "<br /><img src=" + i.GetString("Ecom:Product:Detail.Image.Clean") + " />"; }
}
@html
 

And the result lived up to my expectations, i.e. i get rendered images that I've set up on the product(see attached screen 2).

In that case could you please provide additional information. First version that you upgraded from, and also product details that you have, i hope it will be enough to reproduce the issue.

Thank you for helping us make Dynamicweb system better.

Best regards,
Viktor Letavin
DynamicWEB Software A/S, Russian team
1.jpg 2.jpg
 
Adrian Ursu
Reply

Hi Viktor,

Thank you for your message.

I cannot download the cshtml file.

Can you please archive it first?

Thank you,

Adrian

 
Viktor
Reply

Hi Adrian,

Here you go.

Best regards,
Viktor Letavin
DynamicWEB Software A/S, Russian team

 

You must be logged in to post in the forum