Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

hello,


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

Awatar
Odrzuć
Najlepsza odpowiedź

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.


Awatar
Odrzuć
Najlepsza odpowiedź

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?


Awatar
Odrzuć

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.

Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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 ?

Awatar
Odrzuć

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>

Powiązane posty Odpowiedzi Widoki Czynność
4
kwi 25
8945
1
sie 23
2660
0
mar 21
2637
0
kwi 23
2092
1
sty 22
3169