Developer forum

Forum » Ecommerce - Standard features » Do not render checkbox only works in Field loops

Do not render checkbox only works in Field loops

Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi,

 

Working with 9.4.18 we have a product custom field where "Do not render" is checked.

 

We noticed this is working accurately in the GetLoop("CustomFieldValues"), but if I request that tag directly (outside of the loop - by using GetString("Ecom:Product:Field.MyCustomField")) it will always render. Is this the expected behavior? Or should it not render anything?

 

The documentation is not explicit one way or the other, but when I read it I undestand it should not render the value.

 https://doc.dynamicweb.com/documentation-9/ecommerce/product-catalog/products#2814

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Pedersen
Reply

According to the rendering code, it does not get rendered:

If customFieldValue.ProductField.DoNotRender Then
   Return
End If

It is by the way, the same method that renders both fields... (inside/outside the loop)

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Nicolai,

 

Yeah, I can see it repro now. It seems to have an aggressive caching though. I was expecting to see changes im my product detail template by changing the checkbox status, saving and refreshing my frontend. That did not happen.

 

Is this by design? I just need to understand to set the right expectation on developers and customers and know which steps to take to check settings when they are changed.

 

Best Regards,

Nuno Aguiar

 
Morten Buhl Dynamicweb Employee
Morten Buhl
Reply
This post has been marked as an answer

Hi Nuno

It's not ny design but rather a small caching bug. Registered as 55396

/Morten

Votes for this answer: 1
 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Hi Morten,

 

Good to know. Thank you.

 

Best Regards,

Nuno

 
Kristian Kirkholt Dynamicweb Employee
Kristian Kirkholt
Reply

Hi Nuno

The problem regarding #55396 ""Do not render" state of Product fields is cached until recycle" has now been resolved in Dynamicweb version 9.5.4

To upgrade please choose this version from:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Nuno Aguiar Dynamicweb Employee
Nuno Aguiar
Reply

Thank you Kristian

 

You must be logged in to post in the forum