1

We are unable to add products to the wishlist in 1.6.2.0 when visibility = "Not visible individually".

I have explored two options so far:

Enable Catalog visibility and remove category

The problem with this is we use the products' categories for many things, and having them without a category will cause other issues.

Enable Search visibility

The problem here is that we have some products where a search will return hundreds of results, and the grouped products will be lost in the jumble.

What other alternatives are there? Ideally we want every enabled simple product to be available to add to a wishlist.

3 Answers 3

1

It seems this is a core feature and not an actual issue. You can try overwriting the add to wish list action to accept any kind of products probably, but that will lead to confusion in your customers since they wont be able to click on a wish list link for example. The wish list is a list of products to buy in the future technically, so there is not much sense on adding a product you cant actually buy since its only available in grouped products.

4
  • If I have simple products associated with a grouped product, I want those simple products to be addable to the wishlist, not the grouped product. Commented Jul 14, 2014 at 19:21
  • Since the simple products are not available individually, the answer applies. Its logical and technically correct to be unable to add products to the wish list if they cant be purchased.
    – mbalparda
    Commented Jul 14, 2014 at 19:33
  • I am misunderstanding...all the simple products can be purchased, they are just not visible in search or catalog. Can you point me to something that explains it better? Commented Jul 14, 2014 at 23:46
  • If a simple product cant be seen it cant be purchased as a simple product. It can be only purchased in another type of product like grouped or configurable for example. That is why you cant add a simple product with no visibility to the wish list.
    – mbalparda
    Commented Jul 15, 2014 at 10:54
0

I was tackling adding a configurable products child product to the wishlist and stumbled upon the same issue. Here's how I resolved it:

I overwrote the wishlist getItemCollection function to include 'invisible' products.

class nameSpace_Wishlist_Model_Wishlist extends Mage_Wishlist_Model_Wishlist
{
    public function getItemCollection()
    {
        if (is_null($this->_itemCollection)) {
            /** @var $currentWebsiteOnly boolean */
            $currentWebsiteOnly = !Mage::app()->getStore()->isAdmin();
            $this->_itemCollection = Mage::getResourceModel('wishlist/item_collection')
                ->addWishlistFilter($this)
                ->addStoreFilter($this->getSharedStoreIds($currentWebsiteOnly));

             if (Mage::app()->getStore()->isAdmin()) {
                 $customer = Mage::getModel('customer/customer')->load($this->getCustomerId());
                 $this->_itemCollection->setWebsiteId($customer->getWebsiteId());
                 $this->_itemCollection->setCustomerGroupId($customer->getGroupId());
              }
          }
          return $this->_itemCollection;
     }
}

Help this helps any and all who wander upon this question through time and space!

0

Rewriting Mage_Wishlist_Model_Item::getProduct() was the simplest way I came up with. Before returning a product not visible individually, set its visibility to one of search, catalog or both, and both frontend (missing qty input) and backend (not being able to add item to cart) issues will be resolved.

NB: Double check that your installation doesn't save the modified product afterwards or uses the visibility for any other than wishlist-related purposes. If it does, don't forget to reset the visibility value beforehand, e.g. by taking advantage of $product->getOrigData('visibility').

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.