Post by djiz » Wed Sep 01, 2010 1:54 pm

Hello I'm doing my website on my localhost using wamp as my server now when I test it I have a product and I add a item to the shopping cart it shows up on the cart but when I click on basket or checkout it shows as "Your shopping cart is empty!" and its frustrating because I have no Idea why it keeps on doing this I'm using the latest Version 1.4.9 so I don't think its a bug because it works fine on a live site if any one could help me out I will greatly appreciated it ohh one more thing on the installation the only thing that came up red was curl option don't know if this is a issue or not

New member

Posts

Joined
Tue May 26, 2009 5:05 pm

Post by halomoan » Wed Sep 01, 2010 5:29 pm

I have the same issue. Added products but the cart is empty !

Newbie

Posts

Joined
Wed Sep 01, 2010 5:23 pm

Post by Johnathan » Wed Sep 01, 2010 7:35 pm

This is an issue with local installations and htaccess. If you have SEO URLs enabled, make sure your htaccess is correct, and that OpenCart can find all of the images in the template. I had this problem when images were being referenced by the template, but couldn't be found because they weren't in the template's image folder.

Image Image Image Image Image


User avatar
Administrator

Posts

Joined
Fri Dec 18, 2009 3:08 am


Post by Qphoria » Wed Sep 01, 2010 7:52 pm

Check the latest bugs and fixes here. All are listed in the first post:
http://forum.opencart.com/viewtopic.php ... 293#p94363

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by djiz » Thu Sep 02, 2010 2:35 am

Thank you Qphoria that worked great!!

New member

Posts

Joined
Tue May 26, 2009 5:05 pm

Post by Qphoria » Thu Sep 02, 2010 2:43 am

Johnathan wrote:This is an issue with local installations and htaccess. If you have SEO URLs enabled, make sure your htaccess is correct, and that OpenCart can find all of the images in the template. I had this problem when images were being referenced by the template, but couldn't be found because they weren't in the template's image folder.
Nah, this is an issue with the session change I made. Oddly it works fine for me but not everyone

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Xsecrets » Thu Sep 02, 2010 5:53 am

Qphoria wrote:Oddly it works fine for me but not everyone
nah works fine for me too. I think probably most of the people with problems are on windows hosting.

OpenCart commercial mods and development http://spotonsolutions.net
Layered Navigation
Shipment Tracking
Vehicle Year/Make/Model Filter


Guru Member

Posts

Joined
Sun Oct 25, 2009 3:51 am
Location - FL US

Post by Qphoria » Thu Sep 02, 2010 9:08 am

Xsecrets wrote:
Qphoria wrote:Oddly it works fine for me but not everyone
nah works fine for me too. I think probably most of the people with problems are on windows hosting.
With i2paq's help I managed to figure out why it doesn't work and why it really isn't easy to do it like I was trying because there are too many different setups. It should really only be used in the case where you have multi-store and not on localhost. For some reason I could not specify the domain "localhost". it just refused to make a cookie at all. There are too many variables to mess with for a little used feature.

For those who use the multistore feature with subdomains and don't want to cross sessions between and aren't on localhost they can use:

Code: Select all

session_set_cookie_params(0, '/', $_SERVER['HTTP_HOST']); 
For those who have multiple stores on the same host in different subdirectories can use:

Code: Select all

session_set_cookie_params(0, rtrim(dirname($_SERVER['PHP_SELF']))); 
and be sure to load the catalog page before loading the admin page to have the session already there

Everyone else should use the original:

Code: Select all

session_set_cookie_params(0, '/'); 

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by arbex5 » Mon Jun 03, 2013 5:06 am

Hi,

I setup a subdomain to https traffic like secure.example.com when using admin, cart/checkout page and login page.

I'm having this issue of Shopping Cart Shows Up Empty On Checkout or View Cart after this modification. In short, when you are navigating on http://www.example.com, add a product to cart and go to cart you are redirected to secure.example.com then the cart just go empty. If I go back to product page, the cart will show that the item(s) was added.

I did that because I want to use CloudFlare free plan. So setting up the https on subdomain I can say to CloudFlare pass the https traffic direct to my hosting.

Image

I already triyed the method of this link below but it didn't work.
http://stackoverflow.com/questions/1206 ... subdomains

I'm using opencart 1.5.4.1
Any idea?
Thanks.

Newbie

Posts

Joined
Fri Dec 14, 2012 8:42 pm

Post by arbex5 » Wed Jun 05, 2013 8:40 am

FIXED!

I first thought the problem was related to a module I bought Simple and quick one page checkout and registration from the developer Dmitriy. Then he replied me saying that was about cross site domain. I googled it, tried a few methods but didn't get the thing to work. So I related to him and he gently tried to solve the problem. He did.

He came up with a very simple solution that solved the problem. To fix, hust add a code below to .htaccess in root folder of store.

Code: Select all

php_value session.cookie_domain .example.com
That's all.

My environment:
Hosted by AWS
Using CloudFlare
OpenCart 1.5.4.1

Atention: That might not work with your server
Atention: If you use OpenCart 1.5.5.0 or later it's not necessary because it can handle cross site by default

Thanks to Dmitriy.
Note: His One Page Checkout module is simply great, also his great support. Take a look on the link below.
http://www.opencart.com/index.php?route ... on_id=4811

Newbie

Posts

Joined
Fri Dec 14, 2012 8:42 pm

Post by cargogirl » Wed Jul 29, 2015 1:36 pm

This worked for me even though I didn't have a subdomain or multicart - thanks Dmitriy.I have bought mods from you and always had superb support. A bit Thank You

Code: Select all

php_value session.cookie_domain .example.com
That's all.

]

Thanks to Dmitriy.
Note: His One Page Checkout module is simply great, also his great support. Take a look on the link below.
http://www.opencart.com/index.php?route ... on_id=4811[/quote]

ADG - Design, Development and Hosting in Australia


User avatar
New member

Posts

Joined
Fri Aug 23, 2013 2:11 pm

Post by kgrantarts » Sat Feb 06, 2016 5:30 am

I'm having this same problem with Opencart Version 2.1.0.1.

The .htaccess fix didn't work neither did change this line in system/library/session.php
1.4.9 session_set_cookie_params(0, rtrim(dirname($_SERVER['PHP_SELF'])));
1.4.8 session_set_cookie_params(0, '/');

Anyone have a fix for Opencart Version 2.1.0.1.

Newbie

Posts

Joined
Sat Feb 06, 2016 5:18 am
Who is online

Users browsing this forum: No registered users and 18 guests