Get products to display on custom Magento page
How can you get products to display on a custom Magento page? Naturally, this is not an uncommon question but nothing that I've seen has solved it for me. The common response is to put the following code in through the CMS editor:
{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage” template=”catalog/p开发者_C百科roduct/list.phtml”}}
Which just displays the message "There are no products matching the selection." on my page. Other websites advise reindexing the data through the Magento admin controls, clearing the Magento cache, and making sure products are set to a store, none of which helped in my case.
Anyone have any ideas?
You lost a most important thing is which category you want to display,look the following code
{{block type="catalog/product_list" category_id="XX" name="home.catalog.product.list" alias="products_homepage” template=”catalog/product/list.phtml”}}
After some testing I found this post it was useful to me perhaps it will help you too: Magento products will not show in category
You can find the product quantity in inventory in the nav.menu on the left side of your screen.
In my magento categories I have this structure:
Default Category
- Category 1
- Sub-Category 1
- Sub-Category 2
- Sub-Category 3
- etc
- Category 2
- Sub-Category 4
- Sub-Category 5
- Sub-Category 6
- etc
The default category doesn't contain any products just the other categories. Isn't it a solution, if you want to view all your products, to make such a categorie structure and change the category-id to the default_category? Sorry if this doesn't work I haven't had the time to test it out myself
精彩评论