php - %s appearing along with product name -
i have following code in phtml
file:
<div class="actions"> <?php $_productnamestripped = $this->striptags($_product->getname(), null, true); ?> <a href="<?php echo $_product->getproducturl() ?>" title="<?php echo $this->__(" view details %s "), $_productnamestripped ?>" class="button"><?php echo $this->__('view details') ?> </a> </div>
while hovering details button of product has show view details (product name) (%s
replaced $_productnamestripped
).
actual result: view details %sproductname
expected result: view details productname
try this
<div class="actions"> <?php $_productnamestripped = $this->striptags($_product->getname(), null, true); ?> <a href="<?php echo $_product->getproducturl() ?>" title="<?php echo sprintf("view details %s ",$_productnamestripped) ?>" class="button"><?php echo $this->__('view details') ?> </a> </div>
Comments
Post a Comment