[Solved] Parse error: syntax error, unexpected T_STRING in app/design/frontend/base/default/template/catalog/product/new.phtml on line 37 [closed]


This is caused by the third param of your Mage::helper('core/string')->truncate() call, where the ending string delimiter seems to be missing.

You get the unexpected T_STRING error, because the interpreter reaches the next string ('short'), while knowing that the previous string end wasn’t found yet.

Replace this line

<h3 class="product-name"><a href="https://stackoverflow.com/questions/10328245/<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape(Mage::helper('core/string')->truncate($_product->getName(),60,'鈥?)); ?></a></h3>

with this line

<h3 class="product-name"><a href="https://stackoverflow.com/questions/10328245/<?php echo $_product->getProductUrl() ?>" title="<?php echo $this->htmlEscape($_product->getName()) ?>"><?php echo $this->htmlEscape(Mage::helper('core/string')->truncate($_product->getName(),60,'鈥?')); ?></a></h3>

5

solved Parse error: syntax error, unexpected T_STRING in app/design/frontend/base/default/template/catalog/product/new.phtml on line 37 [closed]