Magento wishlist sidebar and main view only return last 3 added items

Magento wishlist sidebar and main view only return last 3 added items

October 10, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento wishlist sidebar and main view only return last 3 added items

Solving Wishlist Display Issues in Magento 1.4.1.1

Hello fellow developers! Today, I’m going to help you troubleshoot a common issue faced by Magento users running version 1.4.1.1 - the wishlist only displaying the last few added items instead of the complete list.

Understanding the Problem

The issue lies in how Magento’s core functionality handles the display of wishlist contents. By default, it’s designed to show a limited number of items for performance reasons on frontend views like sidebar and main listing pages.

However, if you’re seeing discrepancies between the admin panel (which shows all items correctly), the feed (also correct), but the frontend views only showing 3-4 items while indicating there are more in total, this guide will get you sorted out!

Let’s Dive into Code

The key culprit here is the wishlist view.phtml file and its associated controllers. The default configuration limits the display to a certain number of items.

Firstly, locate your app/design/frontend/default/<your_package>/template/wishlist/view.phtml file. This is where most of the rendering happens for the wishlist items on sidebar and main views.

Look for sections like this:

// app/code/core/Mage/Wishlist/Block/View.php
public function getItems()
{
    $collection = Mage::getResourceModel($this->_getCollectionClass())
        ->addAttributeToSelect(array('name', 'price', 'description'))
        ->setPageSize($this->getItemsCount());

    // Other code...

    return $collection;
}

Notice the setPageSize() method? This is where Magento limits the number of items displayed. By default, it’s set to 4 or 3 depending on your configuration.

Fixing the Issue

To resolve this, you have two main options:

Option A: Change the Configuration

You can simply modify the configuration to increase the items_count value for wishlists. This is done in your theme’s local.xml file under <wishlist_view> node.

<reference name="wishlist_view">
    <action method="setItemsCount"><count>10</count></action>
</reference>

Adjust this number to match the maximum items you want to display on a single page. Save and refresh your cache.

Option B: Override the Core Controller

If you prefer a more robust solution, consider overriding the core WishlistController.php file located at app/code/core/Mage/Wishlist/controllers/IndexController.php.

Create an extension that extends this controller and override the index() action to modify the collection:

public function indexAction()
{
    $this->loadLayout();
    $this->_title($this->__('Customer Wishlist'));

    // Modify collection here
    $collection = Mage::getResourceModel('wishlist/item_collection');
    $collection->addAttributeToSelect(array('name', 'price', 'description'));
    // No more limiting with setPageSize()

    $this->getLayout()->getBlock('customer.wishlist')->setItems($collection);
    $this->renderLayout();
}

After implementing this, make sure to clear your Magento cache and test again.

Best Practices

Remember, modifying core files is generally discouraged in Magento development. Consider using a proper extension or theme override strategy for long-term maintenance and upgrade compatibility.

For more detailed guides on theme customization and code overriding techniques, I highly recommend checking out the extensive tutorials available at LaravelCompany.

Conclusion

There you have it! With these steps, you should now be able to display all wishlist items correctly on your Magento 1.4.1.1 frontend views.

If you encounter any further issues or need additional help with Magento development, feel free to reach out to our team at LaravelCompany - we’re always here to assist!

Happy coding!

Magento 1 Performance Themes Admin

Our network