Wishlist URL is very long - shorter version possible?

4 years ago
Hello all,

When a shopper wants to share his wishlist, there is an unique URL for that purpose, e.g.:


That works great if the URL is send via email. But in my case, the URL must be printed on a card. I'm almost sure nobody will take the challenge to retype such an URL ;-)

I thought to program some sort of built in link-shortener, but maybe someone has a better idea? Or even has already a solution?

Thanks for every suggestion!
4 years ago
Currently, nopCommerce uses CustomerGUID in the URL for wishlist as it requires a unique value in order to seperate links for each customer.

If you look into the code: Wishlist.cshtml

<a href="@Url.RouteUrl("Wishlist", new { customerGuid = Model.CustomerGuid })" class="share-link">@Url.RouteUrl("Wishlist", new { customerGuid = Model.CustomerGuid }, "http")</a>

You can checkout the "WishlistModel.cs"

using System;
using System.Collections.Generic;
using System.Web.Mvc;
using Nop.Web.Framework.Mvc;
using Nop.Web.Models.Media;

namespace Nop.Web.Models.ShoppingCart
    public partial class WishlistModel : BaseNopModel
        public WishlistModel()
            Items = new List<ShoppingCartItemModel>();
            Warnings = new List<string>();

        public Guid CustomerGuid { get; set; }

If you have a better method in mind of keeping the wishlist URL unique and still short, please feel to customize the code and share your thoughts with us :)

Here is the link to one of the old topic that might be helpful to you in this case (when nopCommerce switched from customerID to CustomerGUID): https://www.nopcommerce.com/boards/t/90/wishlist-by-customerid-not-good-idea.aspx
4 years ago
Many thanks for pointing me in the right direction L.K!

Yes, the problem is the URL's must be unique. Maybe it's better to do this stuff outside Nopcommerce. Found that Google's link shortener has an API for that purpose. Disadvantage is that goo.gl uses capitals, not sure everyone notices the capital S when typing something like goo.gl/fbsS
4 years ago
You're welcome...I am glad it helped :)
4 years ago
These might be helpful to you:




Note: You will need to customize the nopCommerce code in order to implement something like this and save short URL against each customer record in your database so that new short URL does not expire.
4 years ago
Thanks again for the useful information L.K! After reading all this, I go for the lazy solution ;-)

For the present, I've added in Wishlist.cshtml:

Link too long? Use goo.gl to create a short version

(Attention, the shortened link is case sensitive)

The next stadium will be an own link shortener on an own domain, as I prefer not to mix the code for shortening in Nopcommerce. Moreover, I can choose a shorter domain name and program it in a way it use only lower case characters.

In fact, similar as Amazon does with amzn.to ;-)

Many thanks for the input!
3 years ago
Easy using Short URL and QR Code.

Please download modify "Wishlist.cshtml" and copy to "YourStore\Views\ShoppingCart" folder.

Download file "Wishlist.cshtml"