47
Views
10
Comments
To Save the data and store in the another screen

I am just creating the online shopping application in that i have created the buyer and seller page. In that i get the product from the seller and link the data to buyer page. 

In this page i had created the add to cart button. 


If i click the add to cart button means it should be added to another screen (cart icon). 

Can anyone say how to do save the data(For eg: if i click the add to cart button in apple iPhone means futher it have to display in the add to cart screen)

DemoShopping.oml
Champion

Hi,

To maintain the card you can create an entity (let say name is Carts), selected products will save there. Whenever required you can fetch data using aggregate . Whenever flow get completes you just remove the items from entity or can change the status as per your business requirement.

regards

Hi,

You need to save the data to an entity or entities Cart + Cartitem, that also contains the UserId filled with the current userid. On the Cart screen you can then retrieve that data by querying the entities with a filter on Userid = GetUserID()

Regards,

Daniël 

Hi,

The data you are showing in the list it is already you save some where in the DB right.

So on the click of that Add to cart button you have to send one input with respect to the Id

with that ID you can fetch data to another screen.

Hope this will help you!

Thanks

Ruchi


Hi Sakthipriya B ,

you need add the cart screen destination directly or onclick action as well, and you need to create cart entity inculding product id and you can create aggregate with product entity and get the name of products which you have added to cart. 

i am adding the OML file as well go through of it. 

thanks and regards

DemoShopping.oml


Hi Prince Aadil Khan Panwar,

In output the product is not showing properly. I want proper output like this. with proper image and all the data and i have given in input page itself

Can you rectify this problem. 


Hi SakhtiPriya B,

i have fixed this, please try with this. 

thanks and regards.

DemoShoppingnew.oml


Hi Prince Aadil Khan Panwar, 

It is showing error like this

Upgrade Error 
Could not create foreign key constraint. This may have happened because there are 'Productid' values of entity 'Cart' with no corresponding value in entity 'Seller', or attribute 'Productid' of entity 'Cart' is creating a circular dependency between entities. Check the Error Log for more information. 



just try to clear whole data into seller's entity and cart entity. and created products into seller's entity.. and then let me know. 

Hi Sakhtipriya,

You can consider just simple Save and Show method. you should save the data when click on Add To cart button and load that data when your new screens get loads.

You can refer outsystems prebuild templated related to Shopping website. you can find and install this template by click on add new application then click on from an App.

Check this


Hope this helps.


Regards,

Shoeb

Hi @Sakthipriya B
I am not sure with the data model is correct,

I believe you don't need to create seperate entities for the seller and the buyer, these are some type of users with a specific type roles.

There must be a entity of Item and an entity of Cart items. Where the cart items have item Id and UserId of the customer inside it and in item entity there must be User Id of the seller. 

And then add data in the respective entities for proper workflow.

Thanks 
Shlok Agrawal

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.