How to format the page title of a product view page?












0















Currently I'm doing some work on a Magento shop (1.8) and one of the problems the site has is that the SEO and page titles are very poor. So far I've managed to change all of the page titles and meta descriptions for the categories and now I have to sort out the page titles for the product pages.



At the moment, the page title is written like this:




Product NameCategoryCategoryCategory




For a real world example:




Reversible GiletWaistcoats & Gilets For MenClothingMen




Basically there is no space between the product title and the hierarchical category names, which is obviously not desirable.



What I want to do is to just display the product name and the category name that the product is under. So in this example the page title would be:




Reversible Gilet - Waistcoats & Gilets For Men




How can I achieve this?










share|improve this question
















bumped to the homepage by Community 1 min ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.




















    0















    Currently I'm doing some work on a Magento shop (1.8) and one of the problems the site has is that the SEO and page titles are very poor. So far I've managed to change all of the page titles and meta descriptions for the categories and now I have to sort out the page titles for the product pages.



    At the moment, the page title is written like this:




    Product NameCategoryCategoryCategory




    For a real world example:




    Reversible GiletWaistcoats & Gilets For MenClothingMen




    Basically there is no space between the product title and the hierarchical category names, which is obviously not desirable.



    What I want to do is to just display the product name and the category name that the product is under. So in this example the page title would be:




    Reversible Gilet - Waistcoats & Gilets For Men




    How can I achieve this?










    share|improve this question
















    bumped to the homepage by Community 1 min ago


    This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.


















      0












      0








      0








      Currently I'm doing some work on a Magento shop (1.8) and one of the problems the site has is that the SEO and page titles are very poor. So far I've managed to change all of the page titles and meta descriptions for the categories and now I have to sort out the page titles for the product pages.



      At the moment, the page title is written like this:




      Product NameCategoryCategoryCategory




      For a real world example:




      Reversible GiletWaistcoats & Gilets For MenClothingMen




      Basically there is no space between the product title and the hierarchical category names, which is obviously not desirable.



      What I want to do is to just display the product name and the category name that the product is under. So in this example the page title would be:




      Reversible Gilet - Waistcoats & Gilets For Men




      How can I achieve this?










      share|improve this question
















      Currently I'm doing some work on a Magento shop (1.8) and one of the problems the site has is that the SEO and page titles are very poor. So far I've managed to change all of the page titles and meta descriptions for the categories and now I have to sort out the page titles for the product pages.



      At the moment, the page title is written like this:




      Product NameCategoryCategoryCategory




      For a real world example:




      Reversible GiletWaistcoats & Gilets For MenClothingMen




      Basically there is no space between the product title and the hierarchical category names, which is obviously not desirable.



      What I want to do is to just display the product name and the category name that the product is under. So in this example the page title would be:




      Reversible Gilet - Waistcoats & Gilets For Men




      How can I achieve this?







      product-view seo page-title






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 6 '18 at 8:15









      Murtuza Zabuawala

      12.6k73362




      12.6k73362










      asked May 11 '16 at 7:03









      mickburkejnrmickburkejnr

      786




      786





      bumped to the homepage by Community 1 min ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







      bumped to the homepage by Community 1 min ago


      This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          you have to rewrite this class to change on product detail page



          Mage_Catalog_Block_Product_View


          you can rewrite it with below example



          in config.xml



          <global>
          <blocks>
          <catalog>
          <rewrite> <product_view>YourNameSpace_Catalog_Block_Product_View</product_view>
          </rewrite>
          </catalog>
          </blocks>
          </global>


          override in file



          class YourNameSpace_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_View
          {
          protected function _prepareLayout() {
          $product = $this->getProduct();
          $meta_description = $product->getMetaDescription();
          // change your meta title here and assign to product
          return parent::_prepareLayout();
          }


          hope this will sure help to you






          share|improve this answer
























          • I'll try this, but what file am I doing the override in?

            – mickburkejnr
            May 11 '16 at 7:23











          • look for detail thing inchoo.net/magento/…

            – liyakat
            May 11 '16 at 7:37













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "479"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f114834%2fhow-to-format-the-page-title-of-a-product-view-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          you have to rewrite this class to change on product detail page



          Mage_Catalog_Block_Product_View


          you can rewrite it with below example



          in config.xml



          <global>
          <blocks>
          <catalog>
          <rewrite> <product_view>YourNameSpace_Catalog_Block_Product_View</product_view>
          </rewrite>
          </catalog>
          </blocks>
          </global>


          override in file



          class YourNameSpace_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_View
          {
          protected function _prepareLayout() {
          $product = $this->getProduct();
          $meta_description = $product->getMetaDescription();
          // change your meta title here and assign to product
          return parent::_prepareLayout();
          }


          hope this will sure help to you






          share|improve this answer
























          • I'll try this, but what file am I doing the override in?

            – mickburkejnr
            May 11 '16 at 7:23











          • look for detail thing inchoo.net/magento/…

            – liyakat
            May 11 '16 at 7:37


















          0














          you have to rewrite this class to change on product detail page



          Mage_Catalog_Block_Product_View


          you can rewrite it with below example



          in config.xml



          <global>
          <blocks>
          <catalog>
          <rewrite> <product_view>YourNameSpace_Catalog_Block_Product_View</product_view>
          </rewrite>
          </catalog>
          </blocks>
          </global>


          override in file



          class YourNameSpace_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_View
          {
          protected function _prepareLayout() {
          $product = $this->getProduct();
          $meta_description = $product->getMetaDescription();
          // change your meta title here and assign to product
          return parent::_prepareLayout();
          }


          hope this will sure help to you






          share|improve this answer
























          • I'll try this, but what file am I doing the override in?

            – mickburkejnr
            May 11 '16 at 7:23











          • look for detail thing inchoo.net/magento/…

            – liyakat
            May 11 '16 at 7:37
















          0












          0








          0







          you have to rewrite this class to change on product detail page



          Mage_Catalog_Block_Product_View


          you can rewrite it with below example



          in config.xml



          <global>
          <blocks>
          <catalog>
          <rewrite> <product_view>YourNameSpace_Catalog_Block_Product_View</product_view>
          </rewrite>
          </catalog>
          </blocks>
          </global>


          override in file



          class YourNameSpace_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_View
          {
          protected function _prepareLayout() {
          $product = $this->getProduct();
          $meta_description = $product->getMetaDescription();
          // change your meta title here and assign to product
          return parent::_prepareLayout();
          }


          hope this will sure help to you






          share|improve this answer













          you have to rewrite this class to change on product detail page



          Mage_Catalog_Block_Product_View


          you can rewrite it with below example



          in config.xml



          <global>
          <blocks>
          <catalog>
          <rewrite> <product_view>YourNameSpace_Catalog_Block_Product_View</product_view>
          </rewrite>
          </catalog>
          </blocks>
          </global>


          override in file



          class YourNameSpace_Catalog_Block_Product_View extends Mage_Catalog_Block_Product_View
          {
          protected function _prepareLayout() {
          $product = $this->getProduct();
          $meta_description = $product->getMetaDescription();
          // change your meta title here and assign to product
          return parent::_prepareLayout();
          }


          hope this will sure help to you







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 11 '16 at 7:15









          liyakatliyakat

          3,61061933




          3,61061933













          • I'll try this, but what file am I doing the override in?

            – mickburkejnr
            May 11 '16 at 7:23











          • look for detail thing inchoo.net/magento/…

            – liyakat
            May 11 '16 at 7:37





















          • I'll try this, but what file am I doing the override in?

            – mickburkejnr
            May 11 '16 at 7:23











          • look for detail thing inchoo.net/magento/…

            – liyakat
            May 11 '16 at 7:37



















          I'll try this, but what file am I doing the override in?

          – mickburkejnr
          May 11 '16 at 7:23





          I'll try this, but what file am I doing the override in?

          – mickburkejnr
          May 11 '16 at 7:23













          look for detail thing inchoo.net/magento/…

          – liyakat
          May 11 '16 at 7:37







          look for detail thing inchoo.net/magento/…

          – liyakat
          May 11 '16 at 7:37




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f114834%2fhow-to-format-the-page-title-of-a-product-view-page%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Alcázar de San Juan

          Griza ansero

          Heinkel He 51