Creating a ShoppingCart using API's in Unity - unity3d

I Have created a ShoppingCart in Unity using rest APIs. I am using the Intershop rest APIs. I have just fololwed this Reference Link
So there is a web-site which is already running on online which is a E-Commerce Web-Site in that some products are displayed as regular web-site's view only and some of products are displayed in 3D view which is created in Unity. i am just i have written backed-end C# code that is also for create a ShoppingCart. i have written the code for ShoppingCart First i have generate a basketId with that authentication-token has generated and also authorization if users logged only, with that BasketId, Authentication-Token, and Authorization under the these i have developed the code to adding item to cart and also successfully removing item from cart.
So here my problem was when i add the item to cart it was not showing in my WebSite cart, so how could i solve this problem.

You cant mix stateless rest api call with stateful web session calls. The stateful web base shop wont be able to access the basket you create using the rest apis out of the box.
So either only use the rest api or implement the answer from Nils on the intershop server. The last approach you'll need access to the intershop server.

Related

Is it possible to write a public api with Parse SDK?

I am currently writing a web shop application, whose backend will be host at Parse SDK.
I want to add a funcitonality to my app, that if i get an API request to the server to create a new listing.
The API will be called from other apps(I want them to inttegrate it in their system, so if they make a new listing on their personal site, than it will create a new listing on my site too by calling that api).
I want to know if this is possible, I need authentication too, and I want to know if it is possible without providing them my DB application id and rest api key.

Can we create a shopping website using ASP.NET Web API?

Can we create a shopping website using ASP.NET Web API? REST constraints state that it should be stateless, So how do we maintain session which is necessary in a shopping website?
Yes, you absolutely can.
REST constraints state in the sense that you shouldn't store client sessions on the server-side. Instead, you pass the state from client to server, whenever it is needed. There may be multiple ways to go about this, depending on the problem you are trying to solve.
You might find the following links useful:
If REST applications are supposed to be stateless, how do you manage sessions?
https://www.safaribooksonline.com/library/view/restful-web-services/9780596809140/ch01s03.html
Hope this helps!

REST API SERVICE FOR COLLECTING FORM DATA in JAVA

im planning to develop a webapplication using java and HTML implementing as REST Services and confused how ot start with what technologies..
As a First step my first requirement is just creating a login HTML page and create REST SERVICE for LOGIN which validates the user by connecting to Database and generates a session and next page say shopping page.
Please suggest the Java jars,ide, etc to start.
Sorry, your problem is very complex.
To make a website such as shopping page, you can write code with REST services or no need.
If REST Services is used, you must build and setup 2 system/application: web app & server app. (front-end & back-end). With any system/app, you need technologies its own.
To done, you must know many knowledges such as:
API, Rooter, OOP, MVC, how to connect DB,...
There are many IDE such as Eclipse,... or only need a Editor with a few plugin.

Integrating with salesforce

I am trying to figure out as to how partner apps can integrate with salesforce. E.g. https://vimeo.com/85938111. Here you can see that there is contextual navigation from the salesforce Opportunity UI to the partner app and then at the end of the demo the partner app posts data back to salesforce object. I would like to understand as to whether this type of integration uses:
Client side API (SOAP Ajax API) to update the Opportunity that is currently loaded in the UI or does it use some kind of server side integration (partner app consuming the SOAP API from their server side).
How is the UI refreshed to show the partner app update on the UI ?
That looks like custom VisualForce installed via an App Exchange app. So no SOAP necessary.

How to achieve a shopping cart functionality in a stateless REST implementation?

That would mean client always has the complete representation of the cart and server does not maintain the cart in the session.
It will be easier to implement in a single page app or a native mobile app where you do not have page transitions and cart data is available as a JSON object locally.
What about a traditional web app that involves page transitions? What could be some of the options available? Store the content in hidden fields or even in a JSON object when the page is rendered by the server. What do you recommend?