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; ?>
2
  • Add more detail to question Commented Sep 2, 2016 at 6:02
  • it shows the last line end if parser error but i dont know in which part has end if error Commented Sep 2, 2016 at 6:02

1 Answer 1

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; ?>
3
  • Ok, I will do,that but error not solved Commented Sep 2, 2016 at 6:18
  • PLease check my updated answer you miss endforeach at last Commented Sep 2, 2016 at 6:18
  • Ok, Its Working...Thanx.. Commented Sep 2, 2016 at 6:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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