Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Changing size and number of featured products
 
tease
Sr. Member
 
Total Posts:  115
Joined:  2010-10-06
 

Hello erveybody,

I\’m soon launching my website (which runs on 1.7.0.2 and the \"f001 absolute\” skin) but before that I want to alter the design of my homepage. And I am struggling with it, so I hope somebody can help me out with that a bit.

As of now the home page of my site (http://www.schenkeria.de/) features 3 rows with 3 previews per row. (See screenshot)

I want to add 1 picture per row, so that there are 3 rows with 4 pictures. Maybe even change the size of the preview thumbnail a bit larger.

Unfortunaly everything I tried failed, and I have no idea how to solve that problem.

Can anybody tell me how to go about?

Thanks in advance for you help!
Cheers!

Image Attachments
home.PNG
 
Magento Community Magento Community
Magento Community
Magento Community
 
kmHelms
Sr. Member
 
Total Posts:  227
Joined:  2012-03-05
 

you are going to have to add a line to your xml. Add the action method line in and you should be set!

<reference name="content">
  <
block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
    <
action method="setColumnCount"><columns>4</columns></action>
</
block>
</
reference>
For the size of the thumbnails, find the template/phtml file that displays these images (list.phtml?). There should be a line that looks something like
<a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(150); ?>" width="150" height="150" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
My thumbnails display at 150 px, so everywhere you see 150, or 135 in your case, change to the size you want!
 
Magento Community Magento Community
Magento Community
Magento Community
 
tease
Sr. Member
 
Total Posts:  115
Joined:  2010-10-06
 

Thanks KM for responding.
I edited the xml like you said but unfortunaley nothing changed.
This is the code of the xml of the used CMS block: (i put this code into the “xml for layout changes")

<reference name="content">
  <
block type="catalog/product_new" name="home.new" alias="product_new" template="catalog/product/new.phtml">
     <
action method="setColumnCount"><columns>4</columns></action>
        <
action method="addPriceBlockType">
      <
type>bundle</type>
      <
block>bundle/catalog_product_price</block>
      <
template>bundle/catalog/product/price.phtml</template>
    </
action>
  </
block>
</
reference>

When I activated developer paths it mentions “frontend/default/f001/template/catalog/product/list_promo.phtml” as responsible for displaying the product preview. But there is no <colums> section in it.
Can you tell me,how I can edit this phtml, so that there are 4 thumbnails in a row?

Your help is appreciated. Thanks a lot!!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
kmHelms
Sr. Member
 
Total Posts:  227
Joined:  2012-03-05
 

hmm. hopefully someone else chimes in here. I’m certain that’s the code you need to add a column, but maybe it’s in the wrong spot. Your home page is a cms page right? Then you are inserting a cms block that displays those products? Have you bypassed the list.phtml file to display these? My setcolumn count is in the catalog/product_list block, so you could try and change the block you are referencing in the custom xml, but I’m really just guessing.

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">
                    <
block type="catalog/product_list_toolbar" name="product_list_toolbar" template="catalog/product/list/toolbar.phtml">
                        <
block type="page/html_pager" name="product_list_toolbar_pager"/>
     
                    </
block>
                    
                                                                 
                    <
action method="addColumnCountLayoutDepend"><layout>empty</layout><count>6</count></action>
                    <
action method="addColumnCountLayoutDepend"><layout>one_column</layout><count>5</count></action>
                    <
action method="addColumnCountLayoutDepend"><layout>two_columns_left</layout><count>4</count></action>
                    <
action method="addColumnCountLayoutDepend"><layout>two_columns_right</layout><count>4</count></action>
                    <
action method="addColumnCountLayoutDepend"><layout>three_columns</layout><count>3</count></action>
                    <
action method="setToolbarBlockName"><name>product_list_toolbar</name></action>
                    
                    <
action method="setColumnCount"><count>4</count></action>
                    
                </
block>
So, maybe include that first line block type? Sorry I can’t help you further without playing with your files myself. Not that good yet…
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top