spree-contrib / spree_wishlist

Wishlist extension for Spree Commerce.

Home Page:http://guides.spreecommerce.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add to Wishlist is adding the items to my cart

chriscarpenter12 opened this issue · comments

Like the title says. On my product page there is a button with code:

<% if spree_current_user %>
  <div id="wishlist-form">
    <%= form_for Spree::WishedProduct.new do |f| %>
      <%= f.hidden_field :variant_id, :value => @product.master.id %>
      <button type="submit" class="btn btn-secondary">
        <%= Spree.t(:add_to_wishlist) %>
      </button>
    <% end %>
  </div>
<% end %>

When I am signed in and click the Add to Wishlist button it adds the item to my shopping cart.

Maybe wishlist form is inside cart_form on product show view.