I have been creating a shopify wishlist app, but I can’t seem to get around adding the wishlist icon onto grid item on collections template. I need to inject it programmatically because I want the app compatible to any shopify theme, not restricted to one html structure.
I have tried adding it via javascript, but in that way we don’t have the product id, variant id, or product handle information to retrieve data.
2
Answers
Your wishlist is likely best executed using the Theme App Extension pattern. With that, your wishlist become something (A section block) that any merchant can install in their theme and customize, with all the good logic your Wishlist needs. It’s not a hard pattern to follow.
Adding a wishlist icon programmatically to a Shopify collection template can be challenging, especially when aiming for compatibility with various themes. Here are some steps and tips to help you achieve this:
Our Wishlist Guru App offers URL-based Wishlist sharing, Up to 300 wishlist items/month, and Multi-language support.
https://apps.shopify.com/wishlist-guru