There are a few articles and extensions I've come across showing how to add "Featured Products" on the home page of Magento. The problem is that none that I have read, seem to fully tackle the issue of being compatible with Magento 1.4.x (Magento 1.4.0.1 at the time of this writing) AND fully using Magento's features while being fairly easy to implement (i.e. without adding complicated, unnecessary,redundant or outdated code).
Here's a fairly simple way you can add a featured product listing using the standard Magento files, which should work for any version of Magento.
In your Magento /admin section:
1. Create a category as usual (you can put it in any path) and call it, e.g., "Featured Products" and make sure to note the "ID:XX" number. You can set this directory to "Active:NO" if you don't want it to display in your category listing on the front end of your site or just leave it as is. You can leave everything else at the default settings.
2. Go to each product, that you want to appear under "Featured Products", and edit as usual, but this time put a check mark next to the new directory you created "Featured Products". Do this for every product you want to be a "Featured Product". Easy enough.
3. Now... go into your CMS --> Pages and select your home page (you can identify which is for the home page, by looking at the url key which would be something like "home")
4. Click the "Content" tab--switch to HTML editor (non-wysiwyg) and paste in the Content text area:
<div class="featured-products">
<h2 class="heading">Featured Products</h2>
{{block type="catalog/product_list" category_id="YOURCATIDNUMBER" template="catalog/product/list.phtml"}}
</div>
since my category id # was ID:36, I would do the following
<div class="featured-products">
<h2 class="heading">Featured Products</h2>
{{block type="catalog/product_list" category_id="36" template="catalog/product/list.phtml"}}
</div>
Save, and you're done.... You will be presented with a listing of the "Featured Products" on your home page.
- NOTE: you can make a copy of the list.phtml file and name it, e.g. "feature-products.phtml" if you need to make further edits to the listing. Also, if you've upgraded to magento 1.4 , it may be a good idea to copy the latest template file from:
app/design/frontend/base/default/template/catalog/product/list.phtml
and paste this into your template directory overwriting the old.
5. However, if you want it to appear in a grid--i.e. more than the single column, which you will get by default--then all you need to do is edit your CSS file…
Simply add this to your css file used to style your site (I put my at the bottom of my css file):
/* View Type: Featured products, list changed to grid */
.featured-products { width:100%; float:left; clear:both; padding:0; }
.featured-products .products-list { margin:0; padding:0; border:0px solid red; float:left;}
.featured-products .products-list li.item { list-style:none; list-style-image:none; border:1px solid #D8D9D9; background:#FFFFFF; margin:0 3px 3px 0; width:205px; float:left; height:400px; padding:8px; }
.featured-products .products-list h2.product-name { margin:6px 0 6px 0; padding:0; }
.featured-products .products-list h2.product-name a { font:bold 12px/14px Arial, Helvetica, sans-serif; display:block;}
.featured-products .products-list .product-image { float:none; }
.featured-products .products-list .product-shop { float:none; width:auto; margin:0; padding:0;}
.featured-products .products-list .price-box { float:none;}
.featured-products .products-list .desc { float:none; font:normal 11px/13px Arial, Helvetica, sans-serif; margin:6px 0; display:block; width:100%; float:left; }
.featured-products .products-list .desc .link-more { display:block; }
.featured-products .products-list .add-to-links { display:none; /*i hide this since I don't want to show "compare" link on the featured section */}
note the critical usage of ".feature-products" class, which we wrapped around the "Featured Products" block in the CMS home page--without that, this won't work, as you don't want to mess with the regular listing throughout the site, you just want to make the list view into a grid view for the "Featured Products" only.
To change the width and height of your grid, simply change the width and height under
.featured-products .products-list li.item {}
Alright, then…
That should do it... a pretty simple way to create a "Featured Products" section on the home page of Magento, that should be compatible with any current, past, or future Magento versions
Reasons why you must trust ASPHostPortal.com
Every provider will tell you how they treat their support, uptime, expertise, guarantees, etc., are. Take a close look. What they’re really offering you is nothing close to what ASPHostPortal does. You will be treated with respect and provided the courtesy and service you would expect from a world-class web hosting business.
You’ll have highly trained, skilled professional technical support people ready, willing, and wanting to help you 24 hours a day. Your web hosting account servers are monitored from three monitoring points, with two alert points, every minute, 24 hours a day, 7 days a week, 365 days a year. The followings are the list of other added- benefits you can find when hosting with us:
- DELL Hardware
Dell hardware is engineered to keep critical enterprise applications running around the clock with clustered solutions fully tested and certified by Dell and other leading operating system and application providers.
- Recovery Systems
Recovery becomes easy and seamless with our fully managed backup services. We monitor your server to ensure your data is properly backed up and recoverable so when the time comes, you can easily repair or recover your data.
- Control Panel
We provide one of the most comprehensive customer control panels available. Providing maximum control and ease of use, our Control Panel serves as the central management point for your ASPHostPortal account. You’ll use a flexible, powerful hosting control panel that will give you direct control over your web hosting account. Our control panel and systems configuration is fully automated and this means your settings are configured automatically and instantly.
- Excellent Expertise in Technology
The reason we can provide you with a great amount of power, flexibility, and simplicity at such a discounted price is due to incredible efficiencies within our business. We have not just been providing hosting for many clients for years, we have also been researching, developing, and innovating every aspect of our operations, systems, procedures, strategy, management, and teams. Our operations are based on a continual improvement program where we review thousands of systems, operational and management metrics in real-time, to fine-tune every aspect of our operation and activities. We continually train and retrain all people in our teams. We provide all people in our teams with the time, space, and inspiration to research, understand, and explore the Internet in search of greater knowledge. We do this while providing you with the best hosting services for the lowest possible price.
- Data Center
ASPHostPortal modular Tier-3 data center was specifically designed to be a world-class web hosting facility totally dedicated to uncompromised performance and security
- Monitoring Services
From the moment your server is connected to our network it is monitored for connectivity, disk, memory and CPU utilization – as well as hardware failures. Our engineers are alerted to potential issues before they become critical.
- Network
ASPHostPortal has architected its network like no other hosting company. Every facet of our network infrastructure scales to gigabit speeds with no single point of failure.
- Security
Network security and the security of your server are ASPHostPortal’s top priorities. Our security team is constantly monitoring the entire network for unusual or suspicious behavior so that when it is detected we can address the issue before our network or your server is affected.
- Support Services
Engineers staff our data center 24 hours a day, 7 days a week, 365 days a year to manage the network infrastructure and oversee top-of-the-line servers that host our clients’ critical sites and services.