Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
1520 Zobrazení

Hello, I have a question about how to change the endpoint /shop to something else, for example /contacts? I mean, I just want to change the endpoint because I don't want /shop to be displayed; I prefer something else since it doesn't fit the content of the website.  Im using database on odoo.com (v17.0) with licence, i dont have any access to code.

Thanks for help!

Avatar
Zrušit
Nejlepší odpověď

You can create a rewrite rule that redirects users to a 404 page when attempting to access the shop module. Odoo enables the addition of rewrite rules, but first, you must activate developer mode. To do so, navigate to "Settings," scroll to the bottom of the page, and click on "Activate the developer mode. Now you can go to the "Website" module and then "Configuration" > "Redirects". You can configure a rewrite rule in Odoo that disables the shop module from the website, click on "Create" to set up a new rewrite rule. In the form, provide a name for the rule (e.g., "Disable Shop Module") and set the "URL From" field to the path of the shop module, such as "/shop". Set the "Action" field to "404 Not Found" to redirect users attempting to access the shop module to a 404 page. Please note that this will only redirect the shop page and not the individual sub pages.

For more information: A comprehensive guide to running multiple websites in Odoo

I hope this helps!

Avatar
Zrušit
Autor

Oh, I think I described it a bit wrong. I would like to use products and the store as a place to display organization contacts, but only for logged-in users. The store provides nice options for sorting, etc. An example of my use case: I add companies affiliated with the organization as products. People belonging to the organization can log in and see all other companies belonging to the organization with basic information and photos. When they click on a "product," they will get information like email address, etc. I wanted to use the store because then it's easy to add new members of the organization and sort them nicely by categories or aliases I assign to them.

In that case you could try to change the redirect from a 404 to a 308 and set "URL From" to /shop and the "URL To" to /contacts.

Again note that this will only redirect the shop page and not the individual sub pages (e.g., /shop/product-name)

Related Posts Odpovědi Zobrazení Aktivita
1
čvn 24
2698
0
srp 25
71
2
čvc 25
636
2
čvn 25
1187
1
kvě 25
1151