Magento cart stored client side or server side? - magento

If a visitor adds items to their cart on a Magento site, could they follow a URL (maybe containing a session id?) from another machine an see the contents of their cart? Or is the cart stored in a cookie on the client side and therefore not available from another machine?
Thank You.

See the new persistent cart feature in 1.6 CE:
Magento stores a long-term cookie in each browser (per device) once the customer logs in or creates an account using that browser. The long term cookie allows us to re-create some of the session the user had when they were logged in previously. For example, a users shopping cart is re-created upon subsequent visits to the site. It does not allow the customer or another user to access sensitive information. The user will not be able to complete the checkout process or access account information unless they are officially logged in. Persistent shopping cart is completely configurable by merchants, provides an additional way for the merchant to strengthen customer satisfaction and loyalty and helps increase conversion rates.

Related

web application cart implementation for non-logged users

I am working for implementing a spring-boot based shopping application, where a feature exist called ‘add to cart’ for product which works when users is only logged in. Meaning spring-boot back-end creates session when user logged in to make mapping to cart object.
I am trying to implementing a features like real world shopping application like amazon, where product can be added into ‘cart’ even user is not logged in. Then after user log-in user session can be managed / merged with previous non-logged user.
Can some please give me any typical design pattern idea in details or book reference or tutorial link where I can get details idea about such kind of implementation.
If user is anonymous, I would save cart on server and save cart ID in browser using a persistent cookie. When user logs in, server can retrieve the anonymous cart from its ID. Alternatively, you could store full cart in cookie.

How can I stop the shopping cart to persist across store fronts in magento?

I work for a web store selling fashion accessories, and they have one store front for their national site and another for international customers (without VAT).
Occasionally we get customers who order items in the national store because they are on sale and then check out in the international store (by changing store fronts with the standard store front switcher in magento).
If you go directly to the international site via URL, you get an empty shopping cart, but if you use the store front switcher the cart can persist with products from the other store that are not normally available in the international store. Does anyone know how to completely separate these, or empty the cart when switching store fronts?
Well If you create separate website with a single magento setup then customer will not be shared.
This also means that both sites will be independent of each other from customers perspective.
Can you confirm whether your stores are created as different website or same website but different stores.
In admin, System >> Configuration >> Web >> Session Validation Settings,
set Use SID on Frontend to No.
But this will also logout customers coming from different store.

Magento Customer Account Sharing across multiple websites

I have a single magento installation (ver 1.6) and created 3 websites for USA, UK and Europe each has its own store and store view I want to implement multi-currency and sharing one shopping cart among all these three websites. Everything is fine but when I select
System>Configuration>Default>Customer Configuration>Share Customer
Accounts to Global
, I get the following error after successful login tries to redirect customer
Fatal error: Cannot unset string offsets in /home/wwwabc/public_html/lib/Varien/Object.php on line 293
Sometimes login successfully redirect to My Account page and this error displayed when customer clicks on "Logout" I think there is some session/cookie issue but could not figure it out.
Anyone can help quickly please...?
are u sharing cart on website level or store levels. Default magento share shopping cart on store view levels?

Magento cachen in header: welcome and cart when session expired

It seems my Magento is showing wrong information in my header. When the session expires, it still shows information for a specific user. When I return to the website after a day, I did still see "welcome rolandow!", but then when I click this to access "my account", it asks for my login details.
The welcome message I solved by checking in the Header block with IsLoggedIn() if the user is still logged in. But now it also shows my shopping cart while I am logged out.
It shows the actual shopping cart of the user account that I last used to log in. If I open another browser, alter my shopping cart, and then refresh the browser with expired session, the cart is renewed, so the data must be pulled out of the DB. When I click my account, or want to finish the checkout, it asks for login.
So this must be a cookie / cache problem.
I am using APC cache on the server. I don't have caching plugin's installed. Version is 1.6.2.0.
Any idea's?
Ok, sorry, this was probably just the setting "Persistent Shopping Cart" which can be found under System -> Configuration -> (Customers) Persistent Shopping Cart.

Magento PayPal module events

I recently set up some automatic scripts to help me manage incoming orders for a Magento store by using observers and Magento events. My problem is dealing with the question when exactly an order is placed and saved in the system depending on the selected payment type.
For example: if someone simply choses prepayment, the order is saved immediately and the customer is automatically forwarded to a success page - so no problems so far.
If a customer pays via Paypal, the whole situation is completely different. After being redirected to PayPal, logging into the account and confirming the payment, the customer is not redirected to the Magento store. He can click on a link to return there which will also forward him to the success page but surely not everybody will do that and the problem is that the observer event I use only executes code if the user lands on that page. (The event I am working with is "checkout_Onepage_Controller_Success_Action").
Therefore I need to know from where Magento gets the information whether a PayPal payment was successful, has been cancelled or whatever. I looked through some of the PayPal controller files under /app/code/core/Mage/Paypal/controllers/ and the only thing that looked close to a possible solution was the function successAction() in StandardController.php. However, this function also seems to be triggered only when a customer choses to return to the Magento store so it doesn't help me.
Does anybody have some experience with that issue?
I figured out a way to work around the problem:
Appearently there are no events in Magento which correspond with incoming payments on PayPal. A possible solution might be to provide a IPN URL which triggers a script as soon as the payment is confirmed but I managed to redirect the customer to my store so I did not have to do that.
In the profile settings of the PayPal account under "website settings", there is an option called "automatic redirect". If this option is enabled and a URL is entered, the customer will automatically be forwarded to that URL. At first I thought this would not help me because as I said there are multiple web shops involved which all would have their own individual return URL and you can't specify more than one. However, if a return URL is passed over when contacting PayPal, it will override the one that is specified within the profile settings and since the Magento module does that by default, I just had to enter a random URL in the textfield and enable the option, now the customers are redirected back to my shop when they place an order and pay via PayPal.

Resources