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, 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

Magento Forum

Product show by category id in new.phtml
Jr. Member
Total Posts:  3
Joined:  2012-10-01

I have file new.phtml, it’s show product by set Product as New from Date. I want to show by call for category id ... help me please!

file attach and code:


$columnCount = themeOptions('column_count');
$hoverSwap = themeOptions('hover_swap');
$_helper = $this->helper('catalog/output');


<?php if (($_products = $this->getProductCollection()) && $_products->getSize()): ?>
<div class="newproducts">
<div class="carousel">
<div class="slider">
<?php $i=0; foreach ($_products->getItems() as $_product): $i++; ?>
<div class="item slide <?php if(($i == 4 && $_products->getSize() < 5) || ($i == $_products->getSize()) ) echo 'last'?>">
<?php include('view/labels.phtml') ?>
<?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
<a href="<?php echo $_product->getProductUrl() ?>” title="<?php echo $this->htmlEscape($_product->getName()) ?>” class="product-image"><img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(210) ?>” width="210" height="210" alt="<?php echo $this->htmlEscape($_product->getName()) ?>” /></a>
<div class="new-description">
<h3><a href="<?php echo $_product->getProductUrl() ?>” title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape($_product->getName()) ?></a></h3>
<?php echo $this->getPriceHtml($_product, true) ?>

<?php if($_product->isSaleable()): ?>
<button type="button" title="<?php echo $this->__('Add to Cart') ?>” class="button btn-cart” onclick="setLocation(’<?php echo $this->getAddToCartUrl($_product) ?>’)"><span><span><?php echo $this->__('Add to Cart') ?></span></span></button>
<?php else: ?>
<p class="availability out-of-stock"><span><?php echo $this->__('Out of stock') ?></span></p>
<?php endif; ?>
<div style="clear: both;"></div>
<?php endforeach; ?>
<?php if($_products->getSize() > 4): ?>
<div class="prev new-arrow"> </div>
<div class="next new-arrow"> </div>
<?php endif; ?>
<div style="clear: both;"></div>
<?php if($_products->getSize() > 4): ?>
<script type="text/javascript\">
desktopClickDrag: true,
snapToChildren: true,
infiniteSlider: false,
navNextSelector: ‘’,
navPrevSelector: ‘.new-arrow.prev’,
lastSlideOffset: 3,
onFirstSlideComplete: function(){
onLastSlideComplete: function(){
onSlideChange: function(){
<?php endif; ?>
<?php endif; ?>

File Attachments
new.phtml  (File Size: 4KB - Downloads: 16)
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top