2

Parse error: syntax error, unexpected end of file in C:\xampp2\htdocs\magento1.9\app\design\frontend\rwd\default\template\catalog\product\list.phtml on line 216

<?php // Grid Mode ?>

<?php $_collectionSize = $_productCollection->count() ?>
<?php $_columnCount = $this->getColumnCount(); ?>
<?php $i=0; foreach ($_productCollection as $_product): ?>

    <?php if ($i++%$_columnCount==0): ?>
    <ul class="products-grid">
    <?php endif ?>

    <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last<?php endif; ?>">

    <!--bof free shipping--->
    <?php if ($_product->getAttributeText('new') == "Yes"): ?>
        <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('free-shipping')->toHtml() ?>
    <?php endif; ?>

    <!--eof freeshipping-->
    <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(153); ?>" width="153" height="153" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" />
    </a>
    <h2 class="product-name">
        <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a>
    </h2>
    <?php if($_product->getRatingSummary()): ?>
        <?php echo $this->getReviewsSummaryHtml($_product, 'short') ?>
    <?php endif; ?>
  • Add more detail to question – Vishwas Bhatnagar Sep 2 '16 at 6:02
  • it shows the last line end if parser error but i dont know in which part has end if error – Rushikesh Solanki Sep 2 '16 at 6:02
1

at last you can change with below code

   <?php // Grid Mode ?>
   <?php $_collectionSize = $_productCollection->count(); ?>
     <?php $_columnCount = $this->getColumnCount(); ?>
    <?php $i=0; foreach ($_productCollection as $_product): ?>
    <?php if ($i++%$_columnCount==0): ?>
    <ul class="products-grid">
    <?php endif; ?>
     <li class="item<?php if(($i-1)%$_columnCount==0): ?> first<?php elseif($i%$_columnCount==0): ?> last <?php endif; ?>"></li>
     <!--bof free shipping--->
     <?php if ($_product->getAttributeText('new') == "Yes"): ?>
      <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('free-shipping')->toHtml(); ?>
     <?php endif; ?>
     <!--eof freeshipping-->
     <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(153); ?>" width="153" height="153" alt="<?php echo $this->stripTags($this->getImageLabel($_product, 'small_image'), null, true) ?>" /></a>
    <h2 class="product-name"><a href="<?php echo  $_product->getProductUrl() ?>" title="<?php echo $this->stripTags($_product->getName(), null, true) ?>"><?php echo $_helper->productAttribute($_product, $_product->getName(), 'name') ?></a></h2>
   <?php if($_product->getRatingSummary()): ?>
   <?php echo $this->getReviewsSummaryHtml($_product, 'short'); ?>
   <?php endif; ?>
   <?php endforeach; ?>

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.