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.
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);
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
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:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.