Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • René 327 posts 852 karma points
    Jul 09, 2014 @ 10:10
    René
    0

    Related products - Razor

    Hi 

    Im trying to create Related products. 

    I have masteproducts and the products to show in the store. 

    To select the related products i use the Multinode tree picker. 

    //Related products
        string relProStr = TC.GetPropertyValue(storeId, product, "relatedProducts");
        string[] relProIds = relProStr.Split(new char[] { ',' });
        string relProUrl = relProIds.Length > 0 ? Library.NodeById(relProIds[0]).Url : "";
        @relProUrl

    With this code i get the id´s of the related products from the "relatedProducts"

    But im a bit lost here of how to get the url to the product in the store, as it is now i get the url to the MasterProduct

    Any help or ideeas would be great, to point me in the right direction :)

    René 

     

  • René 327 posts 852 karma points
    Jul 09, 2014 @ 13:06
    René
    0

    HI 

    Sometimes a simpel solution can be complicated. 

    I just chamged the relatedProduct picker to choose from the products from the store instead of from the masterproducts.

    René 

Please Sign in or register to post replies

Write your reply to:

Draft