Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

A “View All” button
 
SwiftCol
Sr. Member
 
Total Posts:  85
Joined:  2008-05-22
 

My client wants a landing page for each catagory, and then a normal product grid for each subcategory. Simple enough. They also want a View All page that will show a product grid containing all products for all sub categories.

Now I have edited the Navigation module so that it adds a View All link to the bottom of each sub-category menu, via the following edit to the drawItem method:

$j 0;
$htmlChildren '';
foreach (
$children as $child{
    
if ($child->getIsActive()) {
        
## Edit to keep the last sub-category as being marked last 
        ## to make way for View All added below

        //$htmlChildren.= $this->drawItem($child, $level+1, ++$j >= $cnt);
        
$htmlChildren.= $this->drawItem($child$level+1false);
        
    
}
}

## View All button.
$htmlChildren.= '<li class="level'.$level.' last">'."\n";
$htmlChildren.= '<a href="'.$this->getCategoryUrl($category).'"><span>View All</span></a>'."\n";
$htmlChildren.= '</li>'."\n";

The problem with this method, is that it currently links to the top category’s main page, taking users to the landing page. How can I create a View All type page, and link to it using the method above?

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

Maybe I am not understanding the request correctly, but why not just use the view all that is near the sort by, grid/list, and show 9/15/30/all dropdown?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SwiftCol
Sr. Member
 
Total Posts:  85
Joined:  2008-05-22
 

Because that just shows all of the products in a given sub-category.
Take Magento’s sample products for example. The Electronics section has a landing page, and then it has 3 sub-categories, Cell Phones, Cameras, and Laptops. On the landing page of the Electronics section, you don’t see any products. On each of the sub-category pages, even if you click view all, you still only see all of the products for that sub-category. I need a page the view all of the products in a category, regardless of what sub-category they fall under. Preferably still with the default paging available.

Does that make more sense?

 
Magento Community Magento Community
Magento Community
Magento Community
 
sdb
Sr. Member
 
Avatar
Total Posts:  223
Joined:  2007-11-13
coastal California, USA
 

I think I get it now, you have a multiple tier tree.

My trees only go 1 deep

all
--category
----subcategory
--category 2
----subcategory
----subcategory

... and so on. probably that and my lack of sleep are why i was having a hard time understanding.

What i did to achieve similar results to what you want was make an extra category tree
so for example

all
--category
----subcategory
--category 2
----subcategory
----subcategory
----everything
--category 3
--everything

and each of those “everything” categories i went and added all of the items to them. (just a single checkmark box was enough for me, i dont have too many items)

not really what you are looking for, but it is one roundabout way to do it.

 
Magento Community Magento Community
Magento Community
Magento Community
 
SwiftCol
Sr. Member
 
Total Posts:  85
Joined:  2008-05-22
 

That would be a more manual way of doing it, but then you take the risk of my clients forgetting to check that box.
Does anyone know of a more progrimatical way of doing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
SwiftCol
Sr. Member
 
Total Posts:  85
Joined:  2008-05-22
 

So can anyone help with this? I just want a button that shows all products in a given category, regardless of what sub-category the product falls under. This shouldn’t be too hard… Anyone?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top