Jump to content

Empty shopping cart


wsme

Recommended Posts

Hi,

 

I am evaluating WHMCS before buying it for my company. I have installed the scripts, and configured the software. However, when I go through the shopping cart process to buy a product, the cart shows empty when I get to the end. To try this, go to http://shop.wsme.co.uk/cart.php and try to add a product to your cart. Also, when I add an item manually in the admin area to a customer, it doesn't work properly in there either!

 

Thanks,

 

Paul

Link to comment
Share on other sites

  • 7 months later...
  • 4 weeks later...
  • 3 weeks later...

For the others with this problem start by checking the session_save_path which is normally /tmp by default and be sure that it has the correct permissions.

eg..

if the path is /tmp make sure that the permisions on the tmp directory are set to 1777

to change the perms use chmod 1777 /tmp

Link to comment
Share on other sites

Yes, but that would mean that cart is always empty, but if just 10% of users report that they can't order that have nothing to do with session save path.

 

I think that WHMCS is actually using cookies only for order so when client have some "internet security suite" that is blocking some cookies, such clients just can't order, and we lose some % of clients because of that, and because they usually don't know what is blocking cookies and does not know how to disable that. If that is the reason as I presume it is, I think that WHMCS cart should use session only if it can't create cookie.

Link to comment
Share on other sites

Yes, but that would mean that cart is always empty, but if just 10% of users report that they can't order that have nothing to do with session save path.

 

I think that WHMCS is actually using cookies only for order so when client have some "internet security suite" that is blocking some cookies, such clients just can't order, and we lose some % of clients because of that, and because they usually don't know what is blocking cookies and does not know how to disable that. If that is the reason as I presume it is, I think that WHMCS cart should use session only if it can't create cookie.

 

Exactly , only a few clients can't make an order because the cart is empty.

Link to comment
Share on other sites

Yes - the issue here is it seems slightly random.

Those users who have the issue, switch browser and all is fine. But we've had some fail with IE, some fail with FF3 etc. - there is no repeatable pattern to the behaviour.

 

We only started getting reports of this with the recent 3.7.1 and 3.7.2 WHMCS - we never had people mention it or saw any trace of this before then.

Link to comment
Share on other sites

I also have to report one strange case, we had one user that succesfully ordered domain, and he wanted to order a hosting package two days later, but he just couldn't because cart was always empty, so I really have no idea what can be a reason for this, I asked him what is changed in his computer in last two days, and he said that nothing is changed, it was working two days ago, and now he just gets empty cart... Really strange...

Link to comment
Share on other sites

From our experiences this really looks like an issue in WHMCS causing this somewhere, that was introduced in 3.7.1

 

We never had a single ticket stating 'cannot add items to cart' prior to 3.7.1 and several since, despite the server configuration being *exactly* the same.

 

It could be co-incidence but looking at all the other reports in this thread, it looks like something could be at play in the WHMCS code?

Link to comment
Share on other sites

Come on guys... your session problems really has nothing to do with WHMCS.

In the real early versions of whmcs the command to start the session was

session_start ();

and in the latest version it is still

session_start ();

It's a php command not a function of whmcs.

 

The only thing that could have changed is php updates on your server. You may not have upgraded yourself because cPanel does updates automatically every night.

 

Have you re-compiled apache lately?

Have you actually looked in your server logs for changes?

Link to comment
Share on other sites

Ok, but can you explain to us, what php settings can cause that cart is not working only for some small % of clients... :)

 

Come on guys... your session problems really has nothing to do with WHMCS.

In the real early versions of whmcs the command to start the session was

session_start ();

and in the latest version it is still

session_start ();

It's a php command not a function of whmcs.

You wan't to say that there is no whay that programmer make a mistake, php just have a simple commands and that's it... :D

 

The only thing that could have changed is php updates on your server. You may not have upgraded yourself because cPanel does updates automatically every night.

 

cPanel does not automaticaly change php configuration or upgrade php version...

Link to comment
Share on other sites

Ok, but can you explain to us, what php settings can cause that cart is not working only for some small % of clients... :)

As I posted previously, session_save_path is generally the problem.

By default the actual path is /tmp but can vary between different OS's. Permissions on the directory must be writeable. The permissions are set to 1777 by the user root - the "777" means that anyone can read or write to the directory; the initial "1" means that only the owner of a particular file can only affect that file.

if permissions and the actual path is all well, then there is a couple of other reasons that will cause the session not to save.

1. /tmp directory is usually mounted on a set sized disc space or on its own partition. If the partition or directory is full then it can no longer write sessions to the directory.

2. If your max quota has been reached then your userid loses its permissions to write to the /tmp directory

 

You wan't to say that there is no whay that programmer make a mistake, php just have a simple commands and that's it... :D
I did not say that. If a programmer starts altering the session_save_path then yes it could be caused by the programmer. Generally a good programmer has no reason to alter the path as it is suposed to be set by default on the server in the php.ini file. I know that in whmcs the session save path is not altered because when you run phpinfo() from within admin in whmcs the path is still set to the default server path while within the session.

Normal practice is to start the session with session_start(); then you assign variables to the $_SESSION array like $_SESSION['fred'] = 'Fred'; (which I believe is exactly how whmcs does it) then to remove that variable from the session use session_unset ('fred'); to destroy the session completly 2 commands need to be run session_unset (); and then session_destroy ();

I'm not here to give a lesson so if you want to learn more go to http://au2.php.net/manual/en/ref.session.php

 

cPanel does not automaticaly change php configuration or upgrade php version...

Not directly no, but it does run commands to run updates and the like which can include any software installed on the server and even updating the kernel. (Kernel changes wont be noticed until the server is next rebooted.) Take a closer look at your logs. Edited by sparky
Link to comment
Share on other sites

I know all this :), but none of that is the reason in my case...

 

Why are you so shure that it is not possible that there is some glitch in the code that will maybe do session_unset by mistake or maybe set some session variable to some invalid value that will cause cart to be shown as empty, etc. There are a lot more in that cart code than just session_start and session_destroy...

Link to comment
Share on other sites

Why are you so shure that it is not possible that there is some glitch in the code that will maybe do session_unset by mistake or maybe set some session variable to some invalid value that will cause cart to be shown as empty, etc. There are a lot more in that cart code than just session_start and session_destroy...

If this was the case then everybody using whmcs would be having the same problem

 

Can you log in to your admin or as a user without checking the remember me box?

 

EDIT: Sorry Andrew didn't see your post

Link to comment
Share on other sites

can you login to WHMCS without checking the remember me box?

 

Yes, of course I can login with session only - without checking "remember me" box. Also cart is always working for me, I never could replicate that problem that few of our clients reported, but those clients just couldn't order.

 

I am also a PHP programmer and I understand all this, but problem is not session creation on the server in my case, there are only a few cases that clients reported about this problem, and those clients just can't order, I have no idea why, and what did thay do, but they always get empty cart. In the same time other clients can order, just that one client can't... It's really strange.

 

If this was the case then everybody using whmcs would be having the same problem

 

But, how do you know that maybe you also don't have the same problem, that is just some small percent of clients, maybe they try to order, and than they go away when they see that your cart is not working.

 

We had just a few reports about this, but I afraid that there are maybe more cases, but maybe some clients just go away instead of reporting the issue...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated