Developer forum

Forum » Ecommerce - Standard features » Ecom:Product:Field.CustomField.Label returning value

Ecom:Product:Field.CustomField.Label returning value

Mafalda Correa
Mafalda Correa
Reply

Hi,

I have a list box with options where the value is different than the label.

I want to display the label in the frontend, however, even though the template tags returns the correct values, when I output the tag, it returns the value instead of the label:

 

But then when I output: @product.GetString("Ecom:Product:Field.MilkTreatment.Label")

I get TRUE instead of Raw Milk.

I'm using DW 9.10.8

 

Thanks


Replies

 
Mafalda Correa
Mafalda Correa
Reply

Update:

I tested in 9.10.9 and it worked. 

It must be a 9.10.8 bug.

 
Mafalda Correa
Mafalda Correa
Reply

Update 2:

Turns out it didn't really have anything to do with the DW version. I simply had TemplateTags in my template when I was testing in DW 9.10.9.

The label tag only seems to work if TemplateTags() is in the template. 

See the repro here: https://www.screencast.com/t/zeBiqNxX

 
John Broers
Reply

We're still encountering this issue in DW 9.16.8. Is there a workaround or fix available?

In our template, we use @GetString("Ecom:Product:Field.ProductKleurenList.Label") to display the selected labels of a ListBox field. However, the field's value changes depending on whether @TemplateTags() is included in the template. See attachment for the difference: the left side shows the result with @TemplateTags, while the right side shows it without.


BR,

John

Screenshot_2024-12-04_161410.png
 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi,

I was able to reproduce the issue on last DW9.17 as well, I see all view options (of "Display as") except drop-down are failed with the tag for product custom field type of list now. So, I've created new task 22400 to fix the bug. Thanks.

BR, Oleg QA  

 

You must be logged in to post in the forum