+1-888-365-2779
Try Now
More in this section

Forums / Ecommerce / Setting PDFUrl and ModelCodeDesc in code

Setting PDFUrl and ModelCodeDesc in code

5 posts, 0 answered
  1. Michael
    Michael avatar
    4 posts
    Registered:
    05 Aug 2010
    16 Jul 2012
    Link to this post
    From the Sitefinity admin edit product screen there is a PDFUrl and ModelCodeDesc field that can be set.

    These get stored along in the table created when a Product Type is added.

    I'm making a custom control for product import.
    Is it possible to have a PDF Url for each product?  How do I populate these fields in code?
  2. Steve
    Steve avatar
    6 posts
    Registered:
    24 Sep 2012
    17 Jul 2012
    Link to this post
    Hi Michael,
    I am not sure from your post if you have created PDFUrl and ModelCodeDesc fields as these are not apart of Sitefinity Ecommerce.  However you can create custom product type fields, which will allow you to save the PDF URL and a PDF description.   Using the API, you can reference these new fields in your control.
    I have written a blog on importing products into Sitefinity which you can read and download the project from http://www.sitefinity.com/blogs/stevemiller/posts/12-05-10/sitefinity_ecommerce_ndash_importing_products_into_sitefinity_ecommerce.aspx
    We will be releasing the source code for this project sometime this week and I will email you  once this is released.
    All the best,
    Steve
    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
  3. Michael
    Michael avatar
    4 posts
    Registered:
    05 Aug 2010
    17 Jul 2012
    Link to this post
    Yes they are custom product type fields.  Sorry I overlooked that detail.  I already wrote my own custom bulk uploader according to our own rules which is working great.  The only thing missing is I'm not sure how to write to the custom fields.  I didn't see how to do that anywhere in the examples you posted.  Is it just a taxonomy?
  4. Michael
    Michael avatar
    4 posts
    Registered:
    05 Aug 2010
    18 Jul 2012
    Link to this post
    I found this in the documentation

    http://www.sitefinity.com/documentation/documentationarticles/developers-guide/sitefinity-essentials/modules/ecommerce/product-types/custom-fields/setting-the-value-of-a-custom-field

    But the product instances do not have a SetValue method.

    Telerik.Sitefinity.Ecommerce.Catalog.Model.Product

    We are using Sitefinity 5
  5. Michael
    Michael avatar
    4 posts
    Registered:
    05 Aug 2010
    18 Jul 2012
    Link to this post
    I found the solution if anyone is interested.

    You have to include the following using statement since the SetValue is an extension method.
    I think it could be documented better :)
    using Telerik.Sitefinity.Model;

5 posts, 0 answered