We have an e-commerce site with many products and to write a title for each one would be very time consuming. Is there a way in the Admin to set the title as Buy {Product Name} Online where {Product Name} is a variable ?

2 Answers 2


basically you want generic title for all the product.

One way

Either extend Mage_Catalog_Block_Product_View Block


just copy view.php from app/code/core/Mage/Catalog/Block/Product to app/code/local/Mage/Catalog/Block/Product

and following changes

if ($title) {
   $headBlock->setTitle('Buy '.$product->getName().' Online');

By this if meta title is set into product it will show it otherwise will set title as generic (Buy {Product Name} Online).

other way

write custom script to set metatitle for product. Load entire product collection and set meta title.


you can try below extension for your requirement


this extension allows you to create dynamic meta title for all products, also you can set dynamic product name in that meta title.

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.