shopify-wishlist
shopify-wishlist copied to clipboard
Feature Request: Ability to share wishlist through various platforms such as facebook, twitter, email and so on
As our current wishlist is dependent on localstorage of the browser, directly adding social share buttons only works for individual products. We need a way to be able to share the entire wishlist through various social media platforms and email.
Thanks @dlerm for this!
Hi @dlerm , Any ideas into this? I was thinking if there was a way to somehow get a link with product ids on current wishlist page? That way we could probably share links across.
@rjtbansal I was able to set it up so you could create a wishlist URL with query params that held the wishlist product handles (Example: /pages/wislist?w=handle1,handle2...
). The logic for fetching and displaying the products can read that and render properly using those query params.
The issue I am running into is that the social sharing services/endpoints strip out any url query params on share links rendering it useless. The services also forcefully casts all urls to full lowercase. I am working on passing the product handles in the url without query params to be formatted something like this: /pages/wishlist/handle1+handle2+handle3....
(data in the url structure instead of query params).
In both cases the url gets really long if the wishlist has lots of items in it so I am also working on a way to transform the product data into a unique ID/Hash (hopefully ~6-20 characters) that I can use - and then when a user lands on the page I can convert that ID back into product data to be populated on the page. This has proven to be a rather difficult task since hashing is generally a one-way transform. I'm looking into base64 encoding but the but I'll need to find a way to work around the uppercase/lowercase casting from the sharing service.