How To Implement Multipass on Shopify Plus?
Jan 22nd, 2017
Over the past six months we have gotten the pleasure to work with several charities that were looking for a more stable ecommerce platform for their shopping cart solution. Many of them were using Joomla or Drupal.
While both Joomla and Drupal offer great flexibility on the content side, managing customer transactions through an open-source platform was becoming increasingly difficult and costly.
One of the more recent ecommerce replatforms we completed was for Breast Cancer Care (a UK Charity).
The goal: connect their Drupal site to their new Shopify Store via MultiPass.
Why Use Two Platforms?
There are a few reasons a merchant would want to have one platform for content and a separate one for the ecommerce side of their business:
- active forums
- advanced blogging needs
- don't want to migrate hundreds of static content pages
- complex checkout requirements
In the case of Breast Cancer Care, they have an active forum where their members have accounts. In addition, they have a ton of content pages they didn't want to move over to Shopify as there was no obvious benefit in doing so. Lastly, they had a donation section that allows people to set up pre-authorized debit transactions along with specific UK-donation tax benefit receipts.
The Technical Details
All of the customer accounts on the Drupal site were stored in a MySQL database. The client wanted the SHOP link in the top nav of their site to direct people to their Shopify Plus store. Where multipass comes in is if a member is logged into the Breast Cancer Care forum then click 'Shop' they will automatically be logged into the Shopify store.
Here is a list of details that you can pass into Shopify:
- first name
- last name
- zip code
Note: there is no way to send a password to Shopify because you would need to send a plaintext password and nobody has access to that. The passwords are hashed in the database.
In the case of Breast Cancer Care, they only wanted:
- first name
- last name
Being they only wanted the essential values, we were able to read through the multipass documentation for an easy implementation.
Here is the production code we developed for them:
Now that we have the multipass code completed, here are the steps to use that as a redirect endpoint:
- Put the multipass file above somewhere on the Drupal server
- Update the SHOP link on the Drupal site to point to the multipass file
- Your link should have the email of the customer as a GET parameter
So, if you name the file shopify_multipass.php, your link should be firstname.lastname@example.org. If no email is specified, this will just redirect straight through to your Shopify store. If an email is specified, a customer object will be created and logged into the Shopify store.
Brands previously using Drupal for commerce, such as the Fine Arts Museums of San Francisco, can now save money and time by switching to Shopify Plus. Even though there are still a few reasons one would remain on Drupal, Shopify Plus is the most effective commerce solution for the standard Drupal site.
Need help setting up multipass for Drupal or Joomla? Contact our team of experts today!