0

How to show new products without special price? Is it possible to do this in new.phtml

<?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'?>">-->

                    <div class="item slide">
                        <?php include('view/labels.phtml')  ?>    
                        <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>

                        <!-- product -->
                        <div class="box-product-item">
                          <div class="view-first">
                            <div class="view-content">
                              <div class="image">
                                <a href="<?php echo $_product->getProductUrl() ?>">
                                    <img src="<?php echo $this->helper('catalog/image')->init($_product, 'small_image')->resize(188) ?>" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
                                </a>
                              </div>
                              <div class="bottom-block">
                                <div class="name">
                                    <?php

                                    $shortenby = themeOptions('shorten_name');

                                    $product_name = $this->htmlEscape($_product->getName());

                                    mb_internal_encoding("UTF-8");

                                    //if(strlen($product_name) > $shortenby) { $product_name = mb_substr($product_name,0,$shortenby).'...'; }
                                   ?>
                                   <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $product_name ?></a>
                                </div>
                                <!--<div class="link-cart" onclick="setLocation('<?php //echo $this->getAddToCartUrl($_product) ?>')"></div>-->
                                <div class="price">
                        <?php echo $this->getPriceHtml($_product, true) ?>
                                </div>
                              </div>
                            </div>
                            <!--
                            <div class="slide-block">
                              <div class="image-rating"></div>
                              <div class="btn-wish" onclick="setLocation('<?php echo $this->getAddToWishlistUrl($_product) ?>')"><?php echo $this->__('Add to Wish List') ?></div>
                              <div class="btn-compare" onclick="setLocation('<?php echo $this->getAddToCompareUrl($_product) ?>')"><?php echo $this->__('Add to Compare') ?></div>
                            </div>
                            -->
                          </div>
                        </div>
                        <!-- / product -->

                    </div>
                    <?php if($i==10){break;}?>  <!-- limit number of display item -->
                <?php endforeach; ?>
            </div>             
        </div>
        <?php //if($_products->getSize() > 1): ?>
            <!--<div class="prev new-arrow">&nbsp;</div>-->
            <!--<div class="next new-arrow">&nbsp;</div>-->
        <?php //endif; ?>
    </div>     
    <div class="clear"></div>
    <?php if($_products->getSize() > 1): ?>

        <!--
        <script type="text/javascript">

            jQuery('.new-arrow.prev').addClass('disabled');
            jQuery('.carousel').iosSlider({
                desktopClickDrag: true,
                snapToChildren: true,
                infiniteSlider: false,
                navNextSelector: '.new-arrow.next',
                navPrevSelector: '.new-arrow.prev',
                lastSlideOffset: 3,
                onFirstSlideComplete: function(){
                    jQuery('.new-arrow.prev').addClass('disabled');
                },
                onLastSlideComplete: function(){
                    jQuery('.new-arrow.next').addClass('disabled');
                },
                onSlideChange: function(){
                    jQuery('.new-arrow.prev').removeClass('disabled');
                    jQuery('.new-arrow.next').removeClass('disabled');
                }
            });


        </script>
        -->
    <?php endif; ?>
<?php endif; ?>
1

This may resolve the issue, try by commenting the code.

Instead of this:

 <div class="price">
     <?php echo $this->getPriceHtml($_product, true) ?>
 </div>

Try This:

 <div class="price">
     <?php echo number_format($_product->getFinalPrice(),2);?> 
 </div>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.