Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
4 Răspunsuri
5747 Vizualizări

hello,


is it posible to disable /shop page on other websites?

Imagine profil
Abandonează
Cel mai bun răspuns

Hi Carlo:

You can add a redirect for /shop for that Website. For example, the following redirect gives the visitor a page not found message if they try to access /shop for Website2.


Imagine profil
Abandonează
Cel mai bun răspuns

Is there any other way to enable the shop module for just specific websites? It seems pretty crazy in v17 that this not an option in the system. We have to redirect a load of pages in order to disable it. Surely an option in the code and relevant checking whether or not add to the site map for that website if the box is ticked or vice versa would be sensible?

I guess this could be done as a module if not a planned feature already in the code?


Imagine profil
Abandonează

I second this. We have multiple websites, only some of which need eCommerce. However if this is solved in a module, it won't be available for us as Odoo Online doesn't support custom modules.

Cel mai bun răspuns

Paresh is right, but a minor add on from my side. You need developer mode activated to find the Redirect Section under "Website" > "Configuration" > "Redirects". Also make sure to remove the menu item for shop on the sites where you don't want it to be disabled. For more information about multiple websites in Odoo see: 

https://jortdevreeze.com/blog/odoo-2/a-comprehensive-guide-to-running-multiple-websites-in-odoo-6

Imagine profil
Abandonează
Cel mai bun răspuns

This solution is only redirecting 1 page. For example, the main /shop page, or /blog page. But this is not redirecting all products of the shop, or all the articles from the blog.
About e-commerce, Odoo is generating the sitemap, so all the pages are visibles by default to anyone.
What is the solution ?

Imagine profil
Abandonează

Use a redirect for all routes in the website_sale controller where: sitemap=True

See: https://github.com/odoo/odoo/blob/15.0/addons/website_sale/controllers/main.py

For example:
URL from: /shop/<model("product.template"):product>

Related Posts Răspunsuri Vizualizări Activitate
4
apr. 25
7913
1
aug. 23
2109
0
mar. 21
2274
0
apr. 23
1761
1
ian. 22
2634