Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability to share wishlist through various platforms such as facebook, twitter, email and so on #12

Open
rjtbansal opened this issue Nov 25, 2020 · 2 comments
Assignees

Comments

@rjtbansal
Copy link

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!

@rjtbansal
Copy link
Author

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.

@dlerm
Copy link
Owner

dlerm commented Dec 4, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants