accesing department field in product list

Posted by Community Admin on 04-Aug-2018 08:34

accesing department field in product list

All Replies

Posted by Community Admin on 01-Mar-2012 00:00

For the e-comm module in sitefinity 4.4 I need to access the department field and use it to help build a hyperlink does anybody no how to access the department field and how it handles sub departments?

Posted by Community Admin on 05-Mar-2012 00:00

Hi,


Can you clarify what you mean by "you need to access the department in the Products list widget?" If you need to add the Department field to the Products Details page then you can go to the Products List widget >> Edit >> Single Item settings >> Edit template for Products Details and drag on the Department field onto the
template or add the code from the code sample below.


<sitefinity:HierarchicalTaxonField ID="HierarchicalFieldControl" runat="server" TaxonomyId="D7831091-E7B1-41B8-9E75-DFF32D6A7837" DisplayMode="Read" WebServiceUrl="~/Sitefinity/Services/Taxonomies/HierarchicalTaxon.svc" Expanded="false" TaxonomyMetafieldName="Department" ExpandText="ClickToAddCategories" BindOnServer="true" />
Also if you need to access the department through code, you can use the code snippet below and don't forget to include the Telerik.Sitefinity.Model reference at the top of the code.

using Telerik.Sitefinity.Model;
 
...product.GetValue("Department")

Please let us know if you have anymore questions.

Kind regards,
Grace Hallwachs
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed