Redirect Product Page

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 anos atrás
Hello:
I have a Category setup with several products.

One of the "products" is a rate list and I would like to re-direct the customer to a page where I have posted the rates.

In earlier Topics I had asked about doing this re-direct at the Category level on the top menu and received great feedback to goto> /Shared/Components/TopMenu/Default.cshtml and make the adjustments like
<li><a href="http://pagetogo.com/">TOPICto USE</a></li>

However, this is now re-directing at the Product level.

Any thoughts on where this adjustment is made?

Thanks for the help in advance
3 anos atrás
realdigital wrote:
One of the "products" is a rate list and I would like to re-direct the customer to a page where I have posted the rates.

It`s a bit unclear for me.
When customer selects a product from a category page, is redirect to product details. Now, you be interested to redirect customer from the product details page to another page? Maybe just would like to add link to another page where you post rates?

Regards,
Tom
3 anos atrás
Thanks.
Not exactly.
The Category has TWO products set up.
The first product (on the Category page) will go as normal to the product page.
The second product (is really a list and you cannot buy anything from it. That is what you do on product 1) I wish to go to a "Rate List" which is on a completely independent page off NOP. So if you click the Product 2 it would be a re-direct.

thanks,
3 anos atrás
realdigital wrote:
So if you click the Product 2 it would be a re-direct.

If you need to show something different by clicking on product details, maybe below scenario will work for you.
1. Create cshtml file, based on product template (if using custom template copy from template),
2. Remove all unnecessary code and add text (or add a topic, like here for example),
3. Add template to nopCommerce (copy to /Product folder of using theme, if default one create /Product folder (this location) and copy file to this location),
4. Add template at admin ,
5. Change template at Product 2 details of admin panel.

Regards,
Tom
3 anos atrás
Thank you Tom,
"2. Remove all unnecessary code and add text (or add a topic, like here for example)"

might be a good solution, however, the "rate list" page I wish to redirect is a dynamic page with php code linking to another platform that updates this rate page.

Creating an cshtml page on nop could be done combining what you showed with our page (which is ratecenter.myrealmobile.com), but, perhaps too complicated for me at this time.

That is why I was hoping for a simple re-direct.
3 anos atrás
realdigital wrote:
That is why I was hoping for a simple re-direct.

The above is also possible with using product template.
Your cshtml file should be like below

@{
    <script>
        window.location.replace("https://nopcommerce.com");
    </script>
}


Just disable buy button, remove price from product details, and.. done.

Regards,
Tom
3 anos atrás
Thank you.

Where is this inserted please? That is, folder/file?

thanks
3 anos atrás
realdigital wrote:
Where is this inserted please?

That code is inserted in a newly created template.

Regards,
Tom
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.