0

I edited my question with the almost solution, but I need a bit of help to finish it off. Hope someone can help.

--

I only want the “Configurable Products” to appear in the grid and list view. This is really easy by setting the Associated Products to “Not Visible Individually”.

What I actually would like to do is that as soon as the customer starts to “filter” on "Size or Colour" attributes the Associated Products DO show up at that point.

Is this at any way possible?

For instance: T-shirt is main configurable product

  • Large in Yellow is a simple Associated Product
  • XLarge in Yellow is a simple Associated Product
  • XXLarge in Yellow is a simple Associated Product
  • Large in Green is a simple Associated Product
  • XLarge in Green is a simple Associated Product
  • XXLarge in Green is a simple Associated Product

As soon as you view the category you just see:

  • “T-shirt” product.

When someone clicks a on the “Green” filter, the category show:

  • T-shirt main product
  • Large in Green is a simple Associated Product
  • XLarge in Green is a simple Associated Product
  • XXLarge in Green is a simple Associated Product

OR if someone clicks the XLarge filter, the category show:

  • T-shirt main product
  • XLarge in Yellow is a simple Associated Product
  • XLarge in Green is a simple Associated Product

Anyone who can help?

EDIT!!!

I just got an Idea! Maybe someone can fill me in on this?

Maybe I should just add ALL the child (simple) products also to category.

I can check if a filter is set using:

$this->getRequest()->getParam('colours')

If the filter is set I can us the standard code:

$_productCollection=$this->getLoadedProductCollection();

If the filter is NOT set I only want to get the configurables

$_productCollection=$this->getLoadedProductCollection()->addAttributeToFilter('type_id', 'configurable');

Can anybody maybe fill me in on that last issue, how to ONLY get the configurable products? It seems that it this one doesn't work properly.

1

I think maybe you're overcomplicating this. I guess your reason for wanting to achieve this is so that your customers can quickly see what's available.

What I would do, is to use something link -

http://amasty.com/color-swatches-pro.html

so that the customer can quickly see the colours available.

  • Thanks. We already use a swatches plus extension. It works fine. This is only regarding the product listing. And as mentioned, I only need to find a way to get my "$_productCollection=$this->getLoadedProductCollection()" only load the configurable products. – user1297622 Aug 1 '13 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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