[4.1] Duplicate content? "Contactus with form" and "contact page"?

9 months ago
Hi we have problem... with duplicate page "contactus"

One page is "content topic + form"... second = only content topic...

Both have 2 different url's (one in english... second with our seo friendly ame... but both have a same content...


How can i change and show only one? when i unpublish "topic content" system contactus... is empty and only with contact form :/

Can somebody help?
9 months ago
Hello Zyje_sobie,

what you are referring to is the default behavior of the topic page with system-name ContactUs. Its content gets automatically added on top of the Contact us page, just above the form. But also, just like any other topic page, a new separate link is created for it.

You cannot stop or remove this, but if you leave the topic page published and do not check any of the Include in ... checkboxes, the link to it will not be added anywhere and the users will not be able to access it unless they know the exact URL of course.

What else you can do is to always redirect your customers to the page with the form even if they try to open the Topic contact page. You can do so by adding the following code to your TopicDetails.cshtml file:

@if (Model.SystemName == "ContactUs" ) {
    <script type="text/javascript" asp-location="Footer">
        $(document).ready(function () {

            if (window.location.pathname === "/contactus-2") {

                window.location.pathname = "/contactus";
            }
        })
    </script>
}


Hope this was helpful.

Best Regards,
Valentin.
9 months ago
Nop-Templates.com wrote:
Hello Zyje_sobie,

what you are referring to is the default behavior of the topic page with system-name ContactUs. Its content gets automatically added on top of the Contact us page, just above the form. But also, just like any other topic page, a new separate link is created for it.

You cannot stop or remove this, but if you leave the topic page published and do not check any of the Include in ... checkboxes, the link to it will not be added anywhere and the users will not be able to access it unless they know the exact URL of course.

What else you can do is to always redirect your customers to the page with the form even if they try to open the Topic contact page. You can do so by adding the following code to your TopicDetails.cshtml file:

@if (Model.SystemName == "ContactUs" ) {
    <script type="text/javascript" asp-location="Footer">
        $(document).ready(function () {

            if (window.location.pathname === "/contactus-2") {

                window.location.pathname = "/contactus";
            }
        })
    </script>
}


Hope this was helpful.

Best Regards,
Valentin.


Hi! thx. It's a little SEO problem. I think it's shouldn't generate in both places :/ also contactus can't be translated, so... well. I don't know why it's designed in this way;)
8 months ago
Hi again Zyje_sobie,

I understand your point but as I previously said we cannot do much about it since this is the default functionality.

If you really think this would improve the default nop-commerce functionality you can submit a suggestion in the Suggestions and Feedback section of the forum and the guys from NopCommerce will tell us if they could schedule it for future application.

Best regards,
Valentin.