Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Jason Mackay 98 posts 149 karma points
    Mar 15, 2012 @ 12:16
    Jason Mackay
    0

    Link to Product from Cart

    Hi guys,

    Is there any easy way to create a link on the product in the cart directed back to the product, I have had a look at this and cant seem to find any easy way of doing this.

    Any help around this would be brilliant. Thanks

    Jason

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 21, 2012 @ 11:43
    Søren Spelling Lund
    0

    You could add a custom property on your order line when the product is added to the cart. Just use that to redirect back. Otherwise you can load the product based on SKU and Variant SKU and generate a URL from that using this code:

    var catalog = ProductCatalog.Get(SiteContext.Current.CatalogContext.GetCurrentCatalogName);
    var product = Product.SingleOrDefault(x => x.Sku == orderLine.Sku);

    var urlService = ObjectFactory.Instance.Resolve<IUrlService>();
    string productUrl = urlService.GetUrl(catalog, product); 
Please Sign in or register to post replies

Write your reply to:

Draft