Developer forum

Forum » Development » Compare Product Fields (custom fields)

Compare Product Fields (custom fields)


Reply
The compare feature seems really interesting, and we would like to use it on a webshop. This particular webshop uses special Product fields for some significant product information. We would like to present data from custom Product Fields in the comparison. Is that possible?

We tried different approaches to output the Product Fields frontend, but no luck yet.

Is it possible at all? Or is there some sort of workaround that will do the trick?

Looking forward to some input. Thanks.

Replies

 
Jeppe Eriksson Agger Dynamicweb Employee
Jeppe Eriksson Agger
Reply
Hi Jens Jakob

You can access product fields in two ways in your template. The first way is to use the CustomFields loop and the other is to use the Field tags directly.

Example:

<!--@LoopStart(Products)-->
<!--@LoopStart(CustomFields)-->
<!--@TagNameOfTheCustomField-->
<!--@LoopEnd(CustomFields)-->
<!--@LoopEnd(Products)-->

Or

<!--@LoopStart(Ecom:Products)-->
<!--@Ecom:Product:Field.TagNameOfTheCustomField.Value-->
<!--@LoopEnd(Products)-->

In both cases the TagNameOfTheCustomField is the actual tag that you gave the CustomField in Management Center when you created them.

You can also read about it here: http://templates.dynamicweb-cms.com/eCommerce/Dynamicweb-eCommerce-template-tags/Product-Catalog/Product-detail/Loops/CustomFields.aspx

Hope it helps :)

- Jeppe

 

You must be logged in to post in the forum