Main website: www.example.com
LMS website: lms.example.com

  • The Main website is public facing for visitors to browse the courses.
  • The LMS website is for the users/commerce to be managed and the actual Course material to be used/viewed.
    Drupal Commerce manages the payments and Access modules manage the users access once purchased.

The 2 websites are setup as Drupal multi-sites:

  • On the same server
  • Separate databases
  • All modules/theme files are under the sites/all folder.


How do I create a 'Buy' button on the main website that will take the visitor to the LMS website with that particular course added in their cart?

Note: there is only a hand full of courses so the link on the main website can be manually added for each course.

  • The subdomain is currently setup as a multisite. If this makes this impossible/very hard, then I could use Domain Access to create the subdomain LMS under the same Drupal install.
    – IamOnStage
    Commented Jul 7, 2017 at 19:32

1 Answer 1


So I have discovered that I will need to create a Rule using the module Rules URL Argument that will take the URL /add-to-cart/[SKU] and add this to cart.

I can create a field on the main site for the SKU and this then outputs the link to the LMS website.

The source is here: https://www.youtube.com/watch?v=6Rn7FLFytTU

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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