A set of Shopify files used to implement a user wishlist on a Shopify store using (S)CSS, Javascript, and Liquid. This implementation uses javascript's localStorage to maintain a user's product wishlist and does not require a user to be logged in to a customer account.
To begin using the Shopify Wishlist copy the following files into your project directory:
assets/Wishlist.js
templates/page.wishlist.liquid
snippets/product-tile.liquid
snippets/wishlist-button.liquid
You must initalize the Wishlist.js module at the bottom of your theme.liquid file for it to work. For help, see the example in the layout/theme.liquid file provided.
In order to add a product to a user's wishlist, there must be an element with a class of wishlist-btn and a data attribute data-product-handle that contains the handle of the product to be added. This can be found in the wishlist-button.liquid snippet file.
On click, the wishlist-button element will have the class is-active added. The product handle from the element will be pushed to an array, converted to localStorage and saved. If a user clicks on a wishlist-button that is currently active, it will remove the corresponding product handle from the localStorage array, and remove the is-active class from that button.
Any time a page is loaded, the Wishlist.js file will scan the page for any wishlist-button elements that have a product handle matching those in the the localStorage array and automatically add the is-active class so that the user can see which products are already in their wishlist.
To setup the custom wishlist page, create a new page called wishlist and set it's template to page.wishlist found in the page.wishlist.liquid file. Make sure the page handle is 'wishlist'.
If you want to change the page handle make sure to update the function loadWishlist in Wishlist.js.
On the custom wishlist page, we will initially load every product in the shop and then run a scan to filter out any products that are not part of the wishlist.
As some shop's may have many products, the Wishlist.js file will hide everything on the page except for a custom loading element until the scan is complete, at which point the loader will disappear and the wishlist items would populate.
We blend classic engineering with modern aesthetics to build high-converting digital experiences for premium brands.
Scalable solutions for growing businesses.
Complete Shopify setup, theme customization, and visual overhaul.
Liquid development and custom app functionality tailored to you.
Improving Core Web Vitals for better SEO and user experience.
Seamless transfer from Magento/Wix/Wordpress to Shopify with no data loss.
Social Media Marketing. Facebook, Instagram, Google etc.
Search Engine Optimization for any category or brands.
Logo Design, Banner & Poster Design
We don't just build websites; we build long-term partnerships based on trust and results.
We provide dedicated, personalized service. You get direct access to the experts working on your project, not just account managers.
Friendly, responsive support that anticipates your needs. We monitor and fix issues before they impact your business.
Future-proof architecture designed to grow with your business. We build systems that adapt to your changing needs.
Clear, honest communication throughout every project. No tech jargon, no hidden costs, and no surprises.
Successful 850+ projects across various industries.
What 15+ recent clients say about working with us.
"GLOBALDSIO IT SOLUTION is best for service and communication. They have provided ongoing work enhancement and best guidance to run my shopify store smoothly. Very impressed with work. Recommend all to use their service."
"The most amazing experience I have had so far. Devang and his team are impeccable at their work, execution and understanding of client requirements. I will continue working with him on my other projects as well."
"Great experience working with them! They understood exactly what we wanted, were very prompt, and made the entire process smooth and hassle-free. Highly recommend their work."
"Excellent work by team. Store Migration from Magento to Shopify was made easy and fast. Complete Setup of Shopify store with all data from Magento. Highly Recommend For Shopify Services."
"Outstanding website for our brand. Completely impressed with work. Provides ongoing service & maintenance. Thank You team for making our brand online presence."
"Made a very pretty website for our brand. Also they are managing our website for ongoing work like regular update of product, collections and even Social Media. Helped us a lot."
Rated 5/5 for Quality of Work and Communication. Successfully delivered Theme Customization services.
"They're incredibly responsive every time I reach out. Even though the issue I encountered was small but recurring, their team always fixed it quickly and on time."
Empowering your business with the best tech ecosystem.