2
I want to do as for example on the Saraiva site:
http://www.livrariasaraiva.com.br/
When doing a search (e.g., "Galaxy Backpacker’s Guide") the url is directed to a smart search url:
They are totally different but unique websites, and they import the information from Name, Cart, Products in Cart, Status and any relevant information to purchase from one site to another.
My question is how do they do this, I’ve been researching and seeing about cookies, but I’m having some difficulties understanding the concept and applying some practical example to see how it would be, is there any way to help me understand better how it works? Or how I set some cookie with the data I need for transfer?
Actually you don’t need to use cookies, you really want to use them?
– Paulo Roberto Rosa
search on how to store data in session... search by localStorage and sessionStorage, probably this will give you some basis.
– Guilherme
Paulo, not necessarily. I would like to know how to do, what I discovered were cookies so far...
– CRAJ
On the example you gave, there’s nothing "smart", it’s just a subdomain, the logged-in user’s session is passed like any other page (with some adjustments). And the search data is passed through GET.
– Lucas Guima
What probably occurs is that the same application is responsible for the two subdomains (www and search). User and cart information may be stored in section variables, and the section cookie on the user’s machine must be valid for any subdomain. But what exactly are you trying to do? Use two subdomains, or share information between two totally different sites?
– bfavaretto
The fact that websites have different formats does not prevent them from using the same database. When you send the user from one site to another, you only need to place a single ID in the URL or even a cookie. Note that the ID of the user’s cart would suffice, not needing anything else to link the two sessions, if the database with the client’s items and data is accessible by the two addresses.
– Bacco