Paul,
Glad to hear you’re starting to get things sorted. The reason that it’s showing in one column, is because you embedded the block in a column of the sample table that comes with magento. That table was hard-coded for design reasons in some of the earlier reasons to show the look that “could” be achieved. You’ll probably want to remove the block from the table and alter the css that controls the homepage.phtml to achieve a “best-sellers table” look.
Hello everyone. I’m very new to magento and was having a hard time finding a way to display products on the homepage as well. I followed Dan’s guide for using the feature attribute and it works well but I would like to have the products display in 3 columns instead of one. jwebber’s code(page2 of thread) looks like a solution but I was just wondering where do I insert the css code? I’m looking in the skin/frontend/default/default/css and there’s 11 css files. If anyone could help me out, I’d really appreciate it. Here is the css code from jwebber’s post. Thanks to Dan and jwebber btw for helping out newbs like me
Ok, open up the file boxes.css in whatever skin you are using. I’m guessing it you might just be altering the default? If so, you can find boxes.css in skin->frontend->default->default->css. Add the following line to the file:
.home-page-item{width:150px; padding:7px;}
Make sure that it has that period before the word home. Save the file, refresh cache if enabled and reload the page and see if that makes a difference.
Thanks for the reply Autofittings. But no, that css code does nothing. I see that this class is used in the homepage.phtml file. As Dan says, it is the container for the product items which I think is the reason why the items only display in one column. There must be a way to add table data and row tags using the php for each product item. Lets say I wanted 3 columns, so three products in one row. Once the third product is reached a new table row is made for the 4th, 5th and 6th product item and so on. Does that make sense to anyone? I was thinking a for loop would do this but I’m not sure how it would be done. Anyway, back to jwebber’s css code. This would be placed in the boxes.css file as well? Any help from anyone would really be appreciated.
I was able to get my products to display in columns but for some reason I can only display 5 products yet I have about 9 enabled with the feature attribute. I’m using the original code from hompage.phtml that Dan provided and this modified css code. Here’s the codes. Any ideas anyone?
Hi all again… sure somebody could help me!
I wrote a post above with a code to modify to show New products in a grid of (for example) two rows and three columns, instead the way that works by default the NEW.PHTML layout.
First, let me say thanks to everyone (especially Dan.)
I am fairly new to Magento and seem to be having a problem… I got Dan’s “featured products” code to work, with a couple of exceptions—my images don’t show up and some of the url’s are incorrect.
To explain in a bit more detail, each “featured product” does indeed show up on the home page, but they all show the default “no image” image. Also, some of the url’s are rewritten while some are not. Some show up as /category/product_name and some show up as /product?id=1234
The images are definitely there— If you view the product, the images show up. That is, of course, unless you click the link that is shown in the “featured products” block...then the images aren’t there. I am totally clueless :-(
I don’t think this is an issue with Dan’s code, I think it has something to do with Magento itself. Any ideas?
Thanks in advance, any help is greatly appreciated!
Dan, I would like to just get the Final price for an item, instead of showing the strikethrough and Special text. What is the best way to get the final price of an item, whether it is on special or not, and just echo it out as a dollar amount?
I tried this in homepage.phtml but I dont think it pulls the correct Special price: