0

Well look I have a multisite.

The main site that uses the sites/all folder for its modules and libreries and another subdomain that uses sites/subdomain for its modules, themes, etc...

they are in separate databases but share the same drupal instance

In the main site I have an inventory app for a local store they manage their inventory and their invoices there.

In the subdomain I did a ecommerce store so they will sell their products through that subdomain, I need that when an user buys a product in the ecommerce store ten automatically I need that purchase to be registered in the inventory that is in the other site.

How to do this connection betweed the 2 sites in a multisite config?

Thanks for your help

  • 1
    This is a brilliant question and exactly what I want to do. Did you find a way to write the module yourself? – cea Jun 13 '15 at 0:03
  • Hi I just wrote an answer, read it, look for it below. Regards – SsouLlesS Jun 13 '15 at 19:07
1

The "standard" way of creating multiple sites with some interaction between them using Drupal is to use the Domain Access module rather than multisites.

However, there is great write-up about using interacting multisites at Drupal Redesign: Domain Access vs. Multisite.

The gist of it is that you set up a multi-site as you normally do. Then you create a custom module to take care of interaction and sharing data between the sites.

Drupal can handle multiple databases, but you can avoid the complexity of managing multiple databases by using a single database and use a database table prefix to avoid namespace collisions. If you already have created the databases as separate databases, you need to use hook_update_N (or SQL operations outside of Drupal) to refactor the schemas.

  • ho ok but what option do I have, because I already have the store in a multisite – SsouLlesS Jun 28 '14 at 22:58
  • @SsouLlesS, I do not understand the question. There is nothing stopping you from creating a custom module to take care of interaction and sharing data between the sites when you already have the store in a multisite. – Free Radical Jun 29 '14 at 5:23
  • I need to know how to share that data, there is a module for that prupose? – SsouLlesS Jun 29 '14 at 19:26
  • @SsouLlesS, there is no existing module. You need to write it yourself. – Free Radical Jun 29 '14 at 20:13
  • @Free Radical Would this be too advanced for someone who has never created their own module before? I mean, what level of understanding is necessary to jump from the basics to such a thing as communication between sites? – cea Jun 13 '15 at 0:07
0

Hi look what I finally did, was to create an API using the services module, for the inventory and used the services module also in the ecommerce store for send requests to the inventory app API, however it was not very easy to manage, and the website become very big and very buggy so I finally gave up with Drupal for this project, so I decided to start from scratch with Ruby On Rails, if you want to learn Ruby On Rails from scratch I recommend you railskarate.com it is totally free, start from the first video and subscribe to their youtube channel, they upload a new lesson everyday.

Hope this help you! Regards!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.