checkout
Page for completing an order
Checkout Page Overview
This page is ordered to process an order on the platform. Users can use the checkout page if they have one or more items in their Cart. Non-logged in users can access the checkout page, but will be asked to sign up or log in before processing a payment. This page used several Do when... workflows to appropriately navigate the user through the checkout form.
Key Workflows
Button Place Order is clicked
Initiates the payment attempt by running the Charge a user using saved CC action
If the payment is successful, the workflow will create a new
Orderinstance and run thePayment successcustom workflowWhen creating the new Order, we refer directly to the payment action to grab a field fields -
Charge IdandAmount chargedAll
Ordersshould havePaid?set to yes and thePayment datefield populatedAddress fields are saved to populate the order confirmation reusable and to pre-populate the address for future checkouts
CC fields are saved to populate the order confirmation reusable
Button Remove Line Item is clicked
Deletes the
Line itemfrom the user'sCartIf the user's
Cartcontains no Line items after this one is deleted, theCartwill be deleted and the user will be redirected from the checkout page
[Custom] Payment success
This is triggered following a successful payment for the order
Updates the
Cart'sPaid?to yes as well as populates a few other price fieldsUpdating the
Cart'sPaid?field is important - as thisCartwill no longer be used for future functionality
Deletes all unpaid Carts (
Paid?set to no) linked to the userThe application should only save paid
Carts,as these are used for reference purposes on the user's settings page
Updates the
Cart'sLine itemsUpdates the
Cart'sProductsTotal in stockandTold soldfieldsSends an order confirmation email to both the customer and app admins
[Custom] Payment failure
Triggered when
Button Place Order has an error running a workflowNotifies the user of the payment error
Page is loaded and Current User isn’t logged in
Sets the
temp cartstate to the user's current cartThis used to store the relevant
Cartfor logged out usersWhen a user logs in or signs up - on either step 1 or step 2 - we run the
Transfer cartcustom workflow, which utilizes thetemp cart
User is logged in and progressbar Main’s step # is 1 and checkout’s temp cart is not empty
Triggered when the user logs in during the initial step of the checkout process
Triggers the
Transfer cartcustom workflow
User is logged in and progressbar Main’s step # is 2
Triggered when the user signs up or logs in using the form on step 2 of the checkout process
Triggers the
Transfer cartcustom workflowAdvances to the next step of the checkout process
User is logged out and Search for Carts:first item is empty
Triggered if no
Carthas been created for the current logged out userRedirects the user to the index page
Do when Search for Carts:first item is empty and checkout’s temp cart is empty and Group Tab 4’s Order is empty
Triggered when there is no
Cartactive for the current userRedirects the user to the index page
[Custom] Transfer cart
Used to transfer the
Cartfrom the logged out user to the logged in userDeletes every
Cartbesides thetemp cartfor the current user (these are no longer necessary)
Key Elements
var - cart subtotal
Used in the calculations for the payment workflows
Calculated by taking the sum of each
Line item'sQuantitymultiplied by itsProduct'sPrice
var - shipping cost
Used in the calculations for the payment workflows
Pulls the
App fee (shipping)value from theWebsiteobject
RepeatingGroup Line Items (Cart)
Contains every
Line itemfor the current user'sCart
Last updated
Was this helpful?