NopCommerce Product Tag Meta description change

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Hi

How do I configure the meta description for a Product Tag page. ( The page you reach after clicking a tag from tag cloud).

At the moment all of them are same ( The default meta description). when it comes to SEO google is expecting unique meta description for all pages.
7 years ago
psnttp wrote:
Hi

How do I configure the meta description for a Product Tag page. ( The page you reach after clicking a tag from tag cloud).

At the moment all of them are same ( The default meta description). when it comes to SEO google is expecting unique meta description for all pages.


Hello there,

You must go to the file '~Views\Catalog\ProductsByTag.cshtml' and in the top of the document you will find the string 'Html.AddTitleParts(string.Format(T("PageTitle.ProductsByTag").Text, Model.TagName));'
Right after this line of code, you must add the bold lines from the example below:

    Html.AddTitleParts(string.Format(T("PageTitle.ProductsByTag").Text, Model.TagName));
    Html.AddMetaDescriptionParts(Model.MetaDescription);
    Html.AddMetaKeywordParts(Model.MetaKeywords);


After that just change both models to:

    Html.AddMetaDescriptionParts(Model.TagName);
    Html.AddMetaKeywordParts(Model.TagName);
7 years ago
thanks.. Do you think its a better idea we incorporate this code in nop commerce... Because google don't like duplicate meta descriptions...
4 years ago
Nop-Templates.com wrote:
Hi

How do I configure the meta description for a Product Tag page. ( The page you reach after clicking a tag from tag cloud).

At the moment all of them are same ( The default meta description). when it comes to SEO google is expecting unique meta description for all pages.

Hello there,

You must go to the file '~Views\Catalog\ProductsByTag.cshtml' and in the top of the document you will find the string 'Html.AddTitleParts(string.Format(T("PageTitle.ProductsByTag").Text, Model.TagName));'
Right after this line of code, you must add the bold lines from the example below:

    Html.AddTitleParts(string.Format(T("PageTitle.ProductsByTag").Text, Model.TagName));
    Html.AddMetaDescriptionParts(Model.MetaDescription);
    Html.AddMetaKeywordParts(Model.MetaKeywords);


After that just change both models to:

    Html.AddMetaDescriptionParts(Model.TagName);
    Html.AddMetaKeywordParts(Model.TagName);


Hello, i cant understand that section "After that just change both models to:

    Html.AddMetaDescriptionParts(Model.TagName);
    Html.AddMetaKeywordParts(Model.TagName)"
How to change models which file?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.