Adding Item to Cart!

Hi Team, I’m struggling to add items to the cart! I am trying to develop a shopping cart application with limited knowledge of microflows! It’ll really help if you show step by step on how to add the products in the cart, and sum the total price and send it to payment gateway and a mail to be sent to client (just till enter card details) for educational purposes. Below are the images:
5 answers

Hello Tejas,


  • Add a Cart entity and your domain model should look like this


  • Your “Add to Cart” widget’s On click should call a microflow that looks like this



  • The following is a microflow that calculates for the total price of the products in a the customer’s cart




Please check the image!


PFA the image attached..


If you have your Project Security level set to “Production”

Then you’ll be able to use this microflow


Now it’s up to you where want to store the value of the total price

You can store it in already existing attributes or create a new one called Total for example


If the total attribute is in Cart entity, you can just add one more activity to the microflow above

Change object: Cart, Customer_Cart, Total, $SumPrice


If Total belongs to other entity you’ll need to Retrieve that entity object and then Change it to store $SumPrice in the Total attribute.


Hi, is it possible that I can view your product and cart page also how you use the call microflow button? 

thank you