Call-back icon  Questions? Contact our sales team to a request a quote

Magento

eCommerce Software for Online Growth

Magento Forum

   
Page 2 of 3
How do i add NEW products to Homepage? 
 
nikefido
Guru
 
Avatar
Total Posts:  454
Joined:  2008-07-11
New Haven, CT
 
xgabo - 12 September 2008 07:10 AM

My front page is now showing new and recentrly viewed products.  How do I keep it from showing recently viewed?  And since you said this is core code, wont our work get erased at the next update?

Yes, this is core code. I personally copy the files and directory structure (and make edits to the copy) into the Local folder as this overrides the core code without you having to edit the core code.

xgabo - 12 September 2008 08:36 AM

Is there a way to make the new products wrap into another column with something like rows of 4

Yes, just edit the corresponding template files to display the information however you like.
The corresponding template files are typically in the “same” file location.
For instance the corresponding template file to app/code/core/Mage/Catalog/Block/Product/View.php would be app/design/frontend/default/default/template/catalog/product/view.phtml

 Signature 

@ My Magento Blog

- Handy tutorials on programming and designing Magento. A continual work in progress!
- Now with a new design, new hosting and a new domain! Check it out!

 
Magento Community Magento Community
Magento Community
Magento Community
 
pldtm
Sr. Member
 
Avatar
Total Posts:  76
Joined:  2007-09-04
Bordeaux, France
 

hi,

i managed to have new products on homepage, with date from and to.But when the date is over the products still appears on homepage. It seems magento doesn’t take care of that. Does anyone have the same problem?

thanks

phil

 Signature 

PL_DTM cool smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
breastfed
Sr. Member
 
Avatar
Total Posts:  154
Joined:  2007-09-24
Münster - Germany
 

My homepage is still not showing some new products.
I dont know how to solve this problem, could somebody, who has done this successfully, post the solution?

Is it possible to do random products as well?

Thank you very much!

 
Magento Community Magento Community
Magento Community
Magento Community
 
screege
Member
 
Total Posts:  72
Joined:  2008-05-08
 

Mee too I cannot show new products I have this by default on my home page:

<!--<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"/>
<block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new"/>
<block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed" />
</reference><reference name="right">
<action method="unsetChild"><alias>right.reports.product.viewed</alias></action>
<action method="unsetChild"><alias>right.reports.product.compared</alias></action>
</reference>-->

Is there anything I should do to get the new products? Are there any special attributes to the products for them to be shown?

Thanks a lot

 
Magento Community Magento Community
Magento Community
Magento Community
 
breastfed
Sr. Member
 
Avatar
Total Posts:  154
Joined:  2007-09-24
Münster - Germany
 

We need help smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
kabuto
Jr. Member
 
Total Posts:  4
Joined:  2008-02-25
 
breastfed - 20 September 2008 09:52 AM

My homepage is still not showing some new products.
I dont know how to solve this problem, could somebody, who has done this successfully, post the solution?

Is it possible to do random products as well?

Thank you very much!

I’ve had the same problem for months, I don’t know how many hours I spent on trying to do the most obvious thing a web store owner wants to do, show the newest products on the first page!!! I can’t believe it isn’t simpler to do, and why this forum doesn’t get bombarded with questions of how to fix it.

On my store some products show up as new and newer products don’t. It has been the same five products since I finally managed to get some new products listed. I have added newer products after this and they don’t show up :-(

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  47
Joined:  2008-07-15
 
screege - 21 September 2008 07:32 AM

Mee too I cannot show new products I have this by default on my home page:

<!--<reference name="content">
<block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"/>
<block type="reports/product_viewed" name="home.reports.product.viewed" alias="product_viewed" template="reports/home_product_viewed.phtml" after="product_new"/>
<block type="reports/product_compared" name="home.reports.product.compared" template="reports/home_product_compared.phtml" after="product_viewed" />
</reference><reference name="right">
<action method="unsetChild"><alias>right.reports.product.viewed</alias></action>
<action method="unsetChild"><alias>right.reports.product.compared</alias></action>
</reference>-->

Is there anything I should do to get the new products? Are there any special attributes to the products for them to be shown?

Thanks a lot

You must remove the <!-- and the --> to work.

I have another question. Is possible to use this method to show products in the frontend filtered by an attribute, like FrontEnd Yes or No option??

How can I do that??

 
Magento Community Magento Community
Magento Community
Magento Community
 
screege
Member
 
Total Posts:  72
Joined:  2008-05-08
 

Thank youy thank you, now its working is there a way for the new products to be displayed random?

Thanks again

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  47
Joined:  2008-07-15
 
screege - 22 September 2008 09:21 PM

Thank youy thank you, now its working is there a way for the new products to be displayed random?

Thanks again

Take a look at this thread, maybe it helps: http://www.magentocommerce.com/boards/viewthread/4454/P30/

Especialy the last 7 posts of the page 3.

EDIT: The firts page of this thread talk about that to.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hercilio Costa
Member
 
Total Posts:  47
Joined:  2008-07-15
 

Now, my problem:

Is possible to use this method to show products in the frontend filtered by an attribute, like FrontEnd Yes or No option??

How can I do that??

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendan.
Sr. Member
 
Total Posts:  188
Joined:  2008-07-16
Sydney, Australia
 

hi,

yep no problem, your on the right track.
Create an attribute like you have suggested. FeaturedProduct or any name you like. Make it a boolean.

Now. You should have a custom module. Mine is for example called featured.php
Here is an extract of my current codebase

/* @var $product Mage_Catalog_Model_Product */
        $todayDate  $product->getResource()->formatDate(time());
        
$products   $product->setStoreId($storeId)->getCollection()
         ->
addCategoryFilter($category)
            ->
addAttributeToFilter('FeaturedProduct', array('Yes'=>true))
            ->
addAttributeToSelect(array('name''price''small_image'), 'inner')
            ->
addAttributeToSelect('status'// this is new line to add

now notice above the line

->addAttributeToFilter('FeaturedProduct', array('Yes'=>true))
This line uses the new attribute you created to set a filter to only find records that have the attribute FeaturedProduct set to true

one further pointer. If you want to randomize the results each time you refresh the page do this in the featured.php
my current codebase is this:

$products->setOrder('hot_deals')->setPageSize(10)->setCurPage(1);
      
$products->getSelect()->order('rand()');
      
$this->setProductCollection($products);

add the line

$products->getSelect()->order('rand()');
to your code

This should get you to where you need to be!

cheers
Brendan

 Signature 

magento 1.1.6
PHP Version 5.2.6
http://www.getstuff.com.au

 
Magento Community Magento Community
Magento Community
Magento Community
 
xgabo
Member
 
Total Posts:  38
Joined:  2008-09-11
 

OK, there is a problem with internet explorer.  IE puts to much spacing in between each new product so 5 products wont fit on a page. And instead of wrapping. IE moves the right column to the bottom of the page and lets the new product row extend to the right.  what can I do to change this.  I dont thing IE understands the 20% per product in the boxes.css file

brendan. - 05 September 2008 04:03 PM

hi,

good to see you got it sorted!.
Ok you might have to modfiy the new.php file

go to

/app/code/core/mage/catalog/product/block/product/new.php

look around line: 53

$products->setOrder('news_from_date')->setPageSize(5)->setCurPage(1);


chenge to

$products->setOrder('news_from_date')->setPageSize(20)->setCurPage(1);


This sets the size of the records to be returned

Another tip

You might want to randomize the results set. Do do this you add some new code . see below

$products->getSelect()->order('rand()');


put this code before the following

$this->setProductCollection($products);

One final thing, the above example is done against the core files. This is not advisable if you plan on upgrading in the future. You can put this code into a custom local module class that is out of the upgrade path. Again, there is a wiki on creating your own modules/classes

enjoy!
Brendan

 
Magento Community Magento Community
Magento Community
Magento Community
 
brendan.
Sr. Member
 
Total Posts:  188
Joined:  2008-07-16
Sydney, Australia
 

yeah, it can drive you mad!.
I can only suggest hard coding to a fixed width. Not ideal, but should work.

Sorry cant be more help

cheers

 Signature 

magento 1.1.6
PHP Version 5.2.6
http://www.getstuff.com.au

 
Magento Community Magento Community
Magento Community
Magento Community
 
playforward
Jr. Member
 
Avatar
Total Posts:  8
Joined:  2008-05-27
Sandpoint, Idaho
 

How would one show products on the homepage like the demo store:
http://demo.magentocommerce.com/

When I uncommented the code within the homepage it put the products there but it didn’t look as nice as the demo store products

Thanks.

 Signature 

Dustin

 
Magento Community Magento Community
Magento Community
Magento Community
 
Gregg
Jr. Member
 
Total Posts:  14
Joined:  2008-02-08
 

Does anyone else have a problem getting grouped products to show up using the new products module? I can’t get them to show up, but simple products do.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 2 of 3
 
© Copyright 2008 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
60006 users|753 users currently online|118851 forum posts