1

I have created grouped product named as catalog 2000. With in this group i have 23 products.

<?php
$products = Mage::getModel('catalog/product')
    ->getCollection()
    ->addAttributeToFilter('type_id', array('eq' => 'grouped'));
foreach ($products as $product) {
    $associatedProducts = $product->getTypeInstance(true)->getAssociatedProducts($product);
    // Do something with $associatedProducts
}

?>

By this, I got products which are belongs to that group. I want to display these product in to separate page like category page. If you have any doubt regarding my explanation sorry for inconvenience. Please refer this site http://www.utsavfashion.in/newarrivals/saree. Each catalog have separate page for to display the products which are belongs to that particular catalog.

1 Answer 1

0

so what exactly are you missing? You already have the products you need now you just have to display them. Use a similar template file like the product_list.phtml

5
  • yeah.I got. But i need the separate URL for that products.(like category page) how do it do?
    – DRAJI
    Aug 27, 2013 at 7:28
  • well you either add a new category attribute like show_grouped_product and assign it the product id and then when getting the product collection for a category you first check if $category->getShowGroupedPorduct() != '' if you have a value then you change the collection Aug 28, 2013 at 12:58
  • Or a more brutal method: add a new CMS page, set the template file to a new template file where you load the products. Would be better to actually create a new block in Catalog and on the CMS page load a block with a parameter set to the grouped product sku or id. like so: {{block type="catalog/grouped_product_list" name="grouped_product_list" product_sku="12345" template="catalog/grouped_product_list.phtml"}} Aug 28, 2013 at 13:02
  • i need it for dynamically. I have added several group product. Thank you for your response
    – DRAJI
    Aug 28, 2013 at 13:10
  • ok, then add a new frontend controller that will be something like domain.com/catalog/grouped/list/product/12345 this will resolve in catalog Module, Grouped Controller, list action with parameters product = 12345 and to create a menu for them you must get a collection of all grouped products and then foreach of them generate the link Aug 28, 2013 at 15:16

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