Create a cart and add a line item

Learn how to build an interactive shopping cart and add line items with dynamic quantity functionality.

Written By Anuj Rajput ()

Updated at April 7th, 2023

In this tutorial, we will learn how to create a cart and add a line item to it. This can improve the online experience and it's using Interplay. 

First Log into your interplay and create an Instance. If you're unsure how to create an Instance go to the "Create an Instance" tutorial on the getting started page.

Procedures  

Step 1

Search for the Http node in the search box and drag it to the workflow. This node will set the end-point for our request

  

Step 2

Search for Cart Create Add Line in the search box and drag it to the workflow. This node provides the functionality to Cart create and add to the workflow. 

Step 3

Search for the Http Response node in the search box and drag it to the workflow. This node will provide the response to our request.

  

                                                            

Step 4

Open the Http node and configure it. Use the POST method, as a body will be sent in this request. Keep the URL simple and understandable and name the node accordingly. Save the node after making the changes.

Step 5

Open the cart create add line node and configure it. The details are as follows

  • Node Name: The name of your node, which is unique and is used to distinguish itself from the other nodes in your flow.
  • Shop Name: The name of the shop whose items are being used.
  • accessToken: The Shopify Storefront Private Token of your shop.

Save the node after making the changes.

Step 6

 

Connect all these nodes and click on deploy. Once you deploy the nodes not only does it deploy what you created but it also saves your workflow. 


Your create cart add line item is ready to use.

Anchor

Was this article helpful?