In this article I'm showing you how to create an online store from scratch using Marketcloud and Heroku. We will start creating a Marketcloud app which will contain all the store's data, from the inventory to the customers and then we will publish a basic eCommerce website to Heroku just with one click.

First of all, we need a Marketcloud and a Heroku account:

  • Create a Marketcloud account here (You will get automatically signed in)
  • Create a Heroku account here.


Part 1: Create your Marketcloud application

Once you are logged into Marketcloud, you can head to your dashboard and create an application.

After you created the app, you will be in front of your dashboard's home with a list of apps. If this is the first app you create, you will only see one app.

Our new shiny store will sell tshirts, let's add the first one to the inventory. To do it we need to open our store's dashboard clicking on "backoffice".

Part 2: Add data to your store

Open your app's dashboard then go to Inventory > Products and click on create product > product with variants.

First thing to do is to add all the basic and required information to the product, such as the name and the price.

Note
We recommend to insert all the basic product's information now, in this way, when you create variants they will inherit a lot of information and you won't need to add it again and again.

Now we can add variants to our product. In our example we are creating a t-shirt and t-shirts can have different sizes and colors. To tell Marketcloud that your product can have variations you must create properties called variants.

When you create a variant you need to do two things:

  • Choose the variant's name, such as "size"
  • Add all the possible variant values, such as "XL", "L", "M", "S" and so on.

You can add any number of variants by clicking on the add variant button. Everytime you add a variant, the dashboard will create all the possible combinations, if you don't want a particular combination (e.g. you don't want to create the XL/Blue variant) you can un-check it.

When you are satisfied with your product, click on save and publish. You can repeat this process and add all the products you want, you can also add categories and brands to let your store's customer navigate your products better.

Part 3: Deploy a starter template to Heroku

In the first part, we added some data to our store, now it's time to publish it to heroku. If you don't have an account on heroku you should create one now.

Head back to your dashboard home and this time click on the "settings" button of your application. The settings dashboard will open on the first page, click on "deploy" on the horizontal menu and you will be taken to another view.

From the select menu you can chose between two starters, one for PHP and one for NodeJS. They are really basic template we created to quickly show how to use the PHP and the NodeJS SDK, and they have similar features.​

When you click on the "Deploy to Heroku" button, you will be taken to heroku on a screen that will allow you to chose your heroku app name and to review some more data.

Insert a fancy name for your store and scroll down to the bottom of the page, where you can see that Heroku prefilled your Marketcloud credentials and you are ready to create your app clicking on "Deploy"

Heroku will create the app for you and you can manage it from your Heroku Dashboard.

From the Heroku Dashboard, click on Open App to open a new tab where you will see your new store already up and running.