4

How do i remove title suffix only from product page. My current Page title is like [Product Name] - [Website Address] here i want to remove website address only from product page which means it should appear in all rest of the pages. Can anyone please help me on this. Thanks in Advance.

2

You can create your custom module and hook the event catalog_controller_product_view

<frontend>
        <events>
            <catalog_controller_product_view>
                <observers>
                    <yourmodule>
                        <type>singleton</type>
                        <class>yourmodule/observer</class>
                        <method>changeProductTitle</method>
                    </yourmodule>
                </observers>
            </catalog_controller_product_view>
        </events>
    </frontend>

And in your Observer.php define the function like below

public function changeProductTitle($observer) {

        if ($product = $observer->getEvent()->getProduct()) {
            $title = $product->getData('name');
            $product->setMetaTitle($title);
            $product->setTitle($title);
        }
        return $this;
    }

Modify the code according to your requirement.

0

Try to go into pages under cms in magento back-end and check out if there is a product page, click edit and see what the title of the certain page is.

Or check the following link it may be helpful

http://inchoo.net/magento/change-any-page-title-in-magento/

  • Sorry I don't have any product page under cms, Is there any other way to do this?. Thanks – Kumar Apr 23 '15 at 10:43
  • i edited my answer give it a go – vasilisdmr Apr 23 '15 at 11:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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