Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
4 Risposte
6715 Visualizzazioni

hello,


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

Avatar
Abbandona
Risposta migliore

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.


Avatar
Abbandona
Risposta migliore

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?


Avatar
Abbandona

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.

Risposta migliore

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

Avatar
Abbandona
Risposta migliore

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 ?

Avatar
Abbandona

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>

Post correlati Risposte Visualizzazioni Attività
4
apr 25
9059
1
ago 23
2722
0
mar 21
2681
0
apr 23
2146
1
gen 22
3244