May 18, 2011 at 3:48 am #547
I thought it was the beta 1.0.9, but it’s working on my local test site.
I add a product to the cart and the amount and number of items shows in the sidebar shopping cart summary widget. But when I go to the shopping cart page or the checkout page, they say the cart is empty — and the widget shows 0 like it’s empty.
This is only happening on my real site, not my local test site. There is a slight PHP version difference between the two. The database contains the same products (imported SQL to load the site).
What can I look for to see why the numbers are not remembered in the cart?
May 18, 2011 at 7:40 am #3210
May 18, 2011 at 1:12 pm #3211
May 18, 2011 at 1:53 pm #3212
Could it be related to this error? I don’t get this on my local machine, although I have the states plugin activated there too. Well, I tried it with the states deactivated and the shopping cart is still empty.
Error: jQuery is not defined
Source File: http://gourmetpopcornshop.com/wp/wp-content/plugins/thecartpress-states/js/tcp_state_scripts.js?ver=6514
May 18, 2011 at 2:08 pm #3213
I just found this in my error log (had a hard time finding the log on the new server):
[warn] mod_fcgid: stderr: PHP Warning: session_start() [function.session-start]: open(/var/lib/php/session/sess_64ihpf0a0q0o0rbiot54onjvb5, O_RDWR) failed: Permission denied (13) in /usr/local/plesk/apache/vhosts/gourmetpopcornshop.com/httpdocs/wp/wp-content/plugins/thecartpress/TheCartPress.class.php on line 60
I can get this fixed but is there something you could warn about if that call fails so the user will know?
May 18, 2011 at 2:26 pm #3214
Joy, I have a similar problem with an item added to the cart but when going to the cart it is empty. In fact, any page change showed an empty cart. This happens on IE7 but not IE9 so I’m assuming, at least to some extent, part of the problem is with IE7, or perhaps even lower versions. The problem there is that a lot of people still use IE7 so a shopping cart always emptying itself is not good.
May 18, 2011 at 2:39 pm #3215
Thanks @books, but I have the same trouble in the Joy’s site and I’m using FireFox. WordPress is stateless, but TheCartPress uses the Session to save the order, so the server doesn’t support Session.
I think the problem is the mod_fcgid. The Apache Server doesn’t store the session between pages. I’m going to study this issue a little.
May 18, 2011 at 2:44 pm #3216
May 18, 2011 at 4:32 pm #3217
I don’t think I can affect much of anything from Plesk. I can’t even find out what versions of PHP or MySQL or Apache are running. I asked them to fix the permissions problem and they said I need to store the session data in a different directory. I think it is a PHP setting though because the code is not specifying where to store it.
It does seem like a good idea to check that the session stuff works on activation, so you could tell the admin that the setup is OK.
My host says there is a function called session_save_path() that tells PHP where to save the session data. So I will add this to my theme functions file. But I just read the details of that function and it is supposed to be called before session_start().
May 19, 2011 at 6:28 am #3218
Could you modify your php.ini file? There are a configuration setting called session.save_path.
Another option is to modify the wp-config.php file with the function session_save_path().
May 19, 2011 at 1:36 pm #3219
I don’t know if I could get a php.ini working in the Plesk environment. But I was able to get the support guy to change it for the whole domain (2 actually) so all session variables are saved in a private directory above the web root.
He wanted me to modify the software instead, but I searched the source and several other plugins use session variables too, so that seemed like a bad choice for sustainability.
It works now!
May 19, 2011 at 2:05 pm #3220
June 6, 2011 at 3:40 am #3221
For me, it was a case of uploading the custom php.ini I had on my dev box, to the production server… duh…
July 21, 2011 at 12:15 am #3222
Hi TCP Team
Yes, I had my site moved to a server where I have successful TCP installations working, eg, capethomaswines.com.au is on the same server as colinandy.com.au but Colin’s site is not functioning, ie, has the empty cart issue.
So, from my perspective, TCP is the logical variable.
Is there a way to test whether the TCP installation was complete?
Anyway, here is some server info (webcity.com.au is the host)
Apache version 2.2.17
PHP version 5.2.16
MySQL version 5.0.92-community-log
Operating system linux
Regarding error logs, I have never had to look for them before, is there a common place I can find them? Or would it help if I offered you a temporary user access code to the site/host?
November 28, 2011 at 9:59 am #3223
I have the same problem as Sam describes it.
If there is no way to correct that, I’d loose many customers, since they can’t buy anything at my page…
November 28, 2011 at 10:32 am #3224
If you loses the session, you have to take a look to your server configuration, about php sessions.
May 13, 2012 at 5:52 pm #3225
Visitors are directed to the similar issue at http://community.thecartpress.com/groups/using-twpc/forum/topic/cart-empty-after-adding-product/?topic_page=2&num=15
September 4, 2012 at 9:06 pm #3226
November 29, 2012 at 8:32 am #3227
I have another strange behavior.
When I’m connected as Admin in WordPress, I can put products in my cart. But when a client (not logged in) tries to add a product, the cart is always empty…
Any idea ? Thanks!
Thecartepress version: 1.2.4,
Wordpress version: 3.4.2
November 29, 2012 at 12:50 pm #3228
I have desactivated and reactivated the plugin and that’s fine…
Is there somebidy to tell me why I have to do this ??
November 29, 2012 at 1:34 pm #3229
There is some code that only runs on activation, which is standard for upgrading (deativate, delete, install new version, reactivate). Perhaps the session variables are involved in that code.
November 30, 2012 at 1:39 pm #3230
But I have to do this every day!
Please team I need your help…
You must be logged in to reply to this topic.