ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Multiple companies multiple sites


#1

I am curious if anyone else would support the concept of a single ERPNext instance that can support mutiple companies - to also be able to support multiple websites. (One to one mapping per company)

The principle use case is clear to me.

If a client has several companies the idea of trying to manage them in a single ERP instance vs multiple companies requiring different ERP instances would be far superior solution.

Each company could still preserve its own products, etc… but the websites running on different domains for different reasons would render from the single ERP instance. (Make sense?)

My team would be willing to financially support this effort if there is interest in adding this to the core.


#2

Hi @Steve_Simonson,

this is somewhere at where multitenant versus multi-company is a key topic. Multitenant would cover your needs out of the box and map to domain names.

With companies, this would get somewhat more complicated. However, there is a quick workaround we have in place in some cases: you can implement a simple host-name switch as a JavaScript and use this to select the required homepage (define the web-pages normally, select from the switch)

Something like

window.onload = function () {
	if (window.location.hostname.includes("your-domain-1")) {
		window.location = "route-1";
	}
	else {
		window.location = "route-1";
	}
}

This does not cover the webshop, though…


#3

I appreciate the feedback. Ulimately managing multiple webshops is the real objective.

If we have BRAND that sells in the USA that might be brand.com. That same BRAND may have a brand.ca and a brand.co.uk and a brand.de, brand.fr and so on.

The item level fields could be augmented to include the multiple languages, different dimensions, etc… but the inability to make a webstore is an opportunity.

In the absence of making a multiple webstores/sites work at the company or brand level perhaps mapping more shopify or woocommerce integrations to items or brands would be something to consider.

Anyway food for thought. eCommerce is the fastest growing part of the global economy and there is alot of opportunity in that market. Again my team and I are willing to help fund any enhancements that are helpful in this regard to the core.


#4

Hi @Steve_Simonson

you can create many sites and map many domains

bench setup add-domain [url-site] --site [site]

bench config dns_multitenant on
bench setup nginx
sudo service nginx restart