Developer forum

Forum » Ecommerce - Standard features » How can I check which value is default value of a custom field on a product?

How can I check which value is default value of a custom field on a product?

Sten Hougaard
Reply

Hi,

I need to know what has been choosen as the default value on a ecom custom product field of the type "List".

You can define a number of options, and set one as default.

I need a tag like "productstatusDefaultValue" or perhaps a "productstatusIsDefaultValue" which perhaps is better.

If you look in the database the value seem to be "null" for not-set-values, which would then make the value become default value when testing on the values.


Med venlig hilsen/Best regards,

Sten Hougaard
Webudvikler

E: sho@1stweb.dk
A: København/Aarhus . W: www.1stweb.dk
@: netsi1964


Replies

 
Line Lofquist
Reply

Hi Sten,

In the loop: <!--@LoopStart(newList.Options)--> <!--@LoopEnd(newList.Options)--> (where newList is the templatetag name for my custom product field of type List Box), you find each list item with a value <!--@newList.Option.IsSelected--> which is true for the default value. I know this only works as long as the user does not change their selection, but is it relevant what the default value was before, when the user has made a choice..

I hope this answers your question.

Regards,

Line Løfquist

 

 

 

You must be logged in to post in the forum