Allow Customers to Add Sold Out Products to Wishlists
The Wishl app must know which product variant is selected in order to add it to the wishlist, even when that variant is sold out. Shopify themes do not always expose the sold out variant's ID number. In most cases, you can fix that easily following the instructions below.
- Open your theme's templates/product.liquid.
- Look for the tag
<option disabled></option>
- Add to the option tag the variant id value and a conditional that selects the option when necessary:
<option disabled {% if product.variant_selected == nil and variant == product.variants.first or variant.selected %} selected {% endif %} value="{{ variant.id }}"></option>
That's all. View a sold out product variant in your shop and check if the add to wishlist link/button shows.