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.

  1. Open your theme's templates/product.liquid.
  2. Look for the tag <option disabled></option>
  3. 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="{{ }}"></option>

That's all. View a sold out product variant in your shop and check if the add to wishlist link/button shows.

Still need help? Contact Us Contact Us