On a (donuts) site I'd like to show some different text on a product page with ID 171.

The quantity I have translated to "ammount of boxes", but on one product page I need to change the text "ammount of boxes" to "quantity or ammount"

I'm not sure where to look, when I look at view.phtml (/default/template/catalog/product/view.phtml)

< ?php echo $this->getChildHtml('addtocart') ? >

In what file do I change this? And how? Is there a way to say: when ID is: x , then do: y, else: z?

1 Answer 1


Try this,edit the file in


<?php $_product = $this->getProduct(); ?>
<?php if($_product->getId() == 171) //Change Product Id as per your reqiurement
    $label = $this->__('quantity or ammount');
    $label = $this->__('ammount of boxes');

Change the below code:


<label for="qty"><?php echo $this->__('Qty:') ?></label>


<label for="qty"><?php echo $label ?></label>
  • Thank you so much Saravanavelu! That works perfect.
    – Marc
    Jan 21, 2016 at 13:20

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.