Reputation: 361
i'm new at magento. I want to show a list of products in magento frontend with attributes such as color, size, quantity and add to cart option but the the front page show me the bellow message...
There are no products matching the selection.
i used in homepage editor the bellow code:
{{block type="catalog/product_list" category_id="3" template="catalog/product/list.phtml"}}
Upvotes: 2
Views: 13427
Reputation: 450
Go to your CMS->pages, select your home page and paste this block in the content:
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="Your_category_id" template="catalog/product/list.phtml"}}
Upvotes: 0
Reputation: 8458
Go to your CMS->pages, select your home page and paste this block in the content:
{{block type="catalog/product_list" category_id="category_id_to_show" column_count="number_of_columns" template="catalog/product/list.phtml"}}
category_id_to_show: Go to Catalog -> Manage Categories, select the one you want to show on your home_page, and put your id on the block.
number_of_columns: How many columns you want to show
Hope this helps ;)
Upvotes: 0
Reputation: 749
Go to Catalog ->Manage categories, from the left select category and when you select category you will see the magento ID of that category, and in home page editor write
{{block type="catalog/product_list" category_id="IdYOURCategory" template="catalog/product/list.phtml"}}
.
Also be sure that category is not empty.
Upvotes: 0
Reputation: 11
Even for correct category id also you get same message. Then do the following:
Upvotes: 1
Reputation: 1
If your new in this magento, this might help you .
In phtml file test.phtml
$collection = Mage::getModel('catalog/product')->getCollection();
$collection->addAttributeToSelect('orig_price');
Get the collection by the required attribute. Then,
{{block type="core/template" template="catalog/product/test.phtml"}}
Use this code it will definitely work, :)
Upvotes: 0
Reputation: 4009
If you get this message it means that there are no products in category with id=3...
Remove the category_id part in your code and magento should show all products.
Upvotes: 0