Display set of user chosen categories on magento home page - magento

I am trying to display categories on magento home page. I know how to do it in a normal way using magento collections. I want to have it like a widget, if you insert a category link widget in static block or cms page, you can see the following:
{{widget type="catalog/category_widget_link" template="catalog/category/widget/link/link_block.phtml" id_path="category/3"}}
Now, here the id_path indicates which category to display. Can we modify it somehow to show a list of specified categories. For example like this: id_path = '3,4,5,6' so it will display all these specified categories. Can anybody guide me a way to do this? I don't know much about widget coding stuff in magento.

You can add as many as widgets inside the static block by selecting the widget as many as times you want.

Related

adding product listing on magento homepage with description

I need to show my new products on the home page as a list view. I have used a Magento widget, but it is not returning the description of the product. How can I fetch the whole details of the product in the home page as shown in the image below?
First find out(template hint) the file from where your widget is rendering products. It's located in app/design/frontend/<yourpackage>/<yourtheme>/template/catalog/product/widget/new/content/new_grid.phtml/new_list.phtml
Go look in that file, you will see how and what values are the widgets printing. So if you want description within the foreach loop you can get by printing $_product->getShortDescription() or $_product->getData('short_description')
Similarly to get other stuff like in list page, please take reference from template/catalog/product/list.phtml see how the other details are being printed and get those here on widget phtml file.

showing gallery of category

I'm working on a website. My client want me to show the gallery of the categories on homepage. I tried featured categories beta extension, which didn't work. Please suggest some any other free extension which I can use or any methods display it.Please, I'm a budding developer.
You mean having a slider showing for each category in a block ?
You should consider duplicating the functions used for the main menu (see under /app/code/core/Mage/Catalog/Block/Navigation.php to see how it works) and combine it with your custom layout.
Or you can do it by yourself
Mage::helper('catalog/category')->getStoreCategories();
Will return an array of all level 1 categories in your current store.
Then you can run a foreach code to create your slideshow as you want.
Best Regards,

Brands in sub categories in Magento

I'm trying to solve a problem with the top navigation in Magento.
The top navigation I have, currently shows a top level category and it's sub categories. What I want to do is add another level underneath each sub category containing brands in that sub category as shown here (http://cl.ly/image/3A3D1i1D3j3x)
I want the brand items to be retrieved from the "brands" attribute of products in the parent sub category (Jackets etc.) rather than creating a bunch of brand sub categories in each product type sub category as that is a nightmare for administrating the system.
If anyone knows of a good extension free or paid that does this, I'm willing to go down that route too.
Thanks for the help.
I'm working on something similar right now. It's not an exact fit as it wouldn't integrate with your menu but I would recommend using Amasty's Improved Layered Navigation for this.
It allows you to add a horizontal layered navigation block and set it up so that you can filter by brand based on an attribute. You could use the default manufacturer attribute but I've found it less problematic to add a new one called Brands. The module allows you to assign images to attribute values, so you can have all the logos for your brands listed and the user can filter the products by clicking on the logo.
You can also then use the same brand images in the product list page and the product view page.
This is very easy for your client to manage, they just assign the product it's brand attribute when they create it.
Here's a screenshot of the site I'm working on so far (still not finished so some rough edges) so you can see what I mean. Just a few test products in there and I have used the vertical block rather than the horizontal one but you get the idea. The user just clicks on a logo to filter the list.
And apart from that there's lots of other handy aspects to the module, including sliders for filtering other attributes (weight, price and anything numeric).

How to Retrieve Magento Core Variables in CMS Blocks or Pages?

Changing templates isn't an option in my situation and even so if I make a full HTML page with just two integrated "product blocks: (product name, product image, product price, buy me)", it seems easier to just call the two products you need and insert them directly.
So I'm curious to know if I can retrieve Magento {{variables}} such as product names, images, prices,... . I'm perfectly happy to use Magento Custom Variables to create functions to retrieve these, but I have no idea as to where to start. Any ideas would be appreciated.
As far as I know, it's not possible, nor is it sensible, to do this all from the CMS page.
You're best bet would be to create a widget. Widgets are reusable template tags that are very similar to the blocks used in the Magento layout system.
Once your widget is made, you can then call the widget in the CMS page with a product option, {{widget type="mywidgets/productname" product_id="1"}}, and modify the widget's output based on the product id entered.
The tutorial I've linked to is very good, and should be a great starting point.

Display specific products on a CMS page

Could someone help me with some code to display specific products on a Magento CMS page?
The idea being that I build a page that has multiple sections on it (sections meaning a heading, some intro text and a small handful of products) and the user can add a selection of the displayed products to their cart from this page.
Ideally, the products should be displayed in the grid format, and I should be able to display between 1 and 6 products in each section.
I am using Magento 1.4.0.1 currently.
Cheers!
Consider using a CMS Widget to do this for you.
Here is one: Product List Widget
It isn't free but there are others if you look around.

Resources