Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6100587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T13:24:14+00:00 2026-05-23T13:24:14+00:00

I put this code in my home.phtml, but nothing is shown. I took this

  • 0

I put this code in my home.phtml, but nothing is shown. I took this snippet of script from product/new.phtml :

<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
<?php $i=0; foreach ($_products->getItems() as $_product): ?>
    <?php if ($i>15): continue; endif; ?>

    <div>
            <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>">
                <img class="home-page-img" src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->directResize(40,50,3); ?>"  alt="<?php echo $this->htmlEscape($_product->getName()) ?>" />
            </a>
    </div>

    <div>
    <p><a class="product-name" href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>)"><?php echo $this->htmlEscape($_product->getName()) ?></a></p>
    </div>
<?php $i++; endforeach; ?>
<?php endif; ?> 

How can I make it to display on the homepage? I have set products to be new products within certain date. Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T13:24:14+00:00Added an answer on May 23, 2026 at 1:24 pm

    You can do it by adding something like this to your layout update (CMS -> Pages -> Manage Content, select Home page, go to Design section)

    <reference name="content">
    <block type="catalog/product_new" name="home.catalog.product.new" alias="product_new" template="catalog/product/new.phtml" after="cms_page"/>
    </reference>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

if you run this snippet of code(put it in form1) in a fresh new
Okay, I know it is weird but when I put this code between <head
Edit: I put this snippet of code in jsbin: http://jsbin.com/eneru I am trying to
There is currently this Prototype code that does a PUT: new Ajax.Request(someUrl, { method:
I ran this persons code. It worked as a main but when i put
I have my PHP files stored under FreeBSD under this directory: /home/david/public_html/code/php In my
[Rails] Where to put this code? I have a user1 and when another registered
Maybe a very simple question. How can I put in this code <Query> <Where>
I have this code for update: public Boolean update() { try { data.put(ContactsContract.Groups.SHOULD_SYNC, true);
i want to put the id into the colorbox below this code nom works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.