Placing the order. Please be patient...

Greetings, We are trying to go live with our cs-cart but just can’t seem to get order emails working and order processing is taking an exceptionally long time.



The beta site is installed here, [url]http://www.harrisonmotorsports.com/demo/index.php[/url] It would be 100x better than the old Zen cart if we could get the check out working.



After clicking “Place Order” the site displays 'Placing the order. Please be patient…" for 2-5 minutes. After the order finally processes, no emails are ever sent to the customer.



I assume there is some email issue and the order is not processing until the email server times out. Just a guess.



What I have already tried:

  1. I have eliminated the possibility of the payment gateway causing the issue. We have set up “Phone ordering” as an option to eliminate any requests being sent to Authorize.net.


  2. I am doubtful FedEx is the problem because it works when tested in the admin panel.


  3. I have followed all steps here, [URL=“CS-Cart Documentation — CS-Cart 4.15.x documentation”]CS-Cart Documentation — CS-Cart 4.15.x documentation The site will correctly send a email when a php script is manually run.


  4. All emails in Administration>Settings>Company are set to an email address that matches the domain.


  5. I also attempted to use SMTP email settings provided by the hosting company. This had no effect on the problem and I have set the emails back to “via php mail function” in Administration>Settings>E-mails



    Not sure what to do at this point.

Have you setup the email options in Orders → Order statuses ?



Cheers

When any message like “Processing order” or “Loading your request” just hangs, it usually indicates an underlying problem.



Usually this is caused by a Javascript problem, but it can also be a result of a PHP error while performing an AJAX request.



The first thing to check is your PHP error log. If your browser has the capability, you should also check your browser’s error log.



The email might fail, but that won’t cause the hang.

[quote name=‘tbirnseth’]When any message like “Processing order” or “Loading your request” just hangs, it usually indicates an underlying problem.



Usually this is caused by a Javascript problem, but it can also be a result of a PHP error while performing an AJAX request.



The first thing to check is your PHP error log. If your browser has the capability, you should also check your browser’s error log.



The email might fail, but that won’t cause the hang.[/QUOTE]



I was able to get the email working by correcting the settings, but the checkout still hangs on “Placing the order. Please be patient…”



I have tried it on my computer and several others. The hang up time ranges from 1 to 3 minutes.



When going through ftp using my adminlog account I am able to see a number of log files. The only error log file I see is apache.error_log. I could not find any errors near the time of checkout on the demo site.

Your hosting provider can help you identify where to look for your PHP error logs.

First thing I would do is turn off payments and see if it still hangs (use a method like “check”). If it still hangs then ensure you don’t have any bad javascript like various click trackers and/or conversion trackers. If you do, comment all of them out and add them back one by one by re-ordering the same test order.



You have debugging to do. There is no canned answer. Each site/host/confiration is different and it only takes one error to get you into that state.



You might also look for errors in your Administration/Logs page related to ‘http’ requests. If it’s not enable on the settings tab, enable it and run your test order.

We just implemented all the changes described here, [url]CS-Cart Documentation — CS-Cart 4.15.x documentation, other than “Disable JavaScript pop-up menu.”



There was no change in performance.

[quote name=‘tbirnseth’]Your hosting provider can help you identify where to look for your PHP error logs.[/QUOTE]- Checking on this now.


[quote name=‘tbirnseth’]First thing I would do is turn off payments and see if it still hangs (use a method like “check”).[/QUOTE] - I have enabled phone ordering. I use this method when testing the cart. I assume this is not causing a problem.


[quote name=‘tbirnseth’]If it still hangs then ensure you don’t have any bad javascript like various click trackers and/or conversion trackers. If you do, comment all of them out and add them back one by one by re-ordering the same test order.[/QUOTE]- We have not set up any conversion tracking. Assuming there might still be a JS problem, what is a good method to test for it?


[quote name=‘tbirnseth’]You have debugging to do. There is no canned answer. Each site/host/confiration is different and it only takes one error to get you into that state.



You might also look for errors in your Administration/Logs page related to ‘http’ requests. If it’s not enable on the settings tab, enable it and run your test order.[/QUOTE] - Interesting you bring this up, all fields are checked in Administration>Settings>Logging. Could this be causing the site to run slow? What essential fields should be enabled?

Where do you find php error logs in the phpMyAdmin panel?

[quote name=‘tbirnseth’]You might also look for errors in your Administration/Logs page related to ‘http’ requests. If it’s not enable on the settings tab, enable it and run your test order.[/QUOTE]



I see http/https request "URL: [url]https://gateway.fedex.com:443/GatewayDC[/url]

Request: ‘10,"443223681"498,"6339793"75,"LBS"11,"David Harrison"13,"200 kinross ct"15,"roswell"16,"GA"17,"30009"18,"6788791200"50,"US"4,"Harrison Motorsports"5,"1805 Hembree, Suite F"7,"Alpharretta"8,"GA"9,"30004"117,"US"183,"6788791200"57,"10"58,"10"59,"10"1116,"I"1273,"01"1274,"92"23,"1"1333,"1"1401,"8.0"116,"1"68,"USD"2399,"2"1119,“N"0,“025"99,””’

Response: 0,"125"1133,"1"2399-1,"0"1273-1,"01"1274-1,"92"1090-1,"USD"431-1,"N"1402-1,"8.0"1416-1,"6.04"1417-1,"0.28"1418-1,"1.03"1419-1,“5.29"3058-1,“1"1992-1,“0.00"99,”””



repeated 4 times when I try to process an order. Is this normal?

I disabled FedEx and created a manual shipping method. Administration>Logs still show 3 http/https calls to FedEx. The orders are still taking over 1 minute to process.



Is it common to see three calls to the shipper?

We had this when we first started using CS Cart we found the solution was to change our caching system to sqlite.



In config.local find the following lines and change to read as below



// Cache backend

// Available backends: file, sqlite, mysql, shmem

$config[‘cache_backend’] = ‘sqlite’;





You can also manually clear the payments cache in admin by clicking payment methods and adding &cc to the end of the url but you may need to do this several times a day



Hope this helps



Hetha

[quote]

We just implemented all the changes described here, [url]CS-Cart Documentation — CS-Cart 4.15.x documentation, other than “Disable JavaScript pop-up menu.”

[/quote]

Why would you implment anything new if you’re having problems (new being non-standard)? I can’t help you any further.



When you have a problem, you should solve it first before injecting new problems into the situation. Trying to optimize something that is broken will always fail and just adds more goo to the mess.



The shipping stuff occurs before the order is “placed”.

[quote name=‘tbirnseth’]Why would you implment anything new if you’re having problems (new being non-standard)? I can’t help you any further.



When you have a problem, you should solve it first before injecting new problems into the situation. Trying to optimize something that is broken will always fail and just adds more goo to the mess.



The shipping stuff occurs before the order is “placed”.[/QUOTE]



I appreciate your help, but your comments seem a bit brash.



Were were experiencing what seemed to be site performance issues. It made sense to implement what the KB described as ways to “increasing site performance.” This is a moot point as it had no effect on our issue. It seems as though you are implying that basic trouble shooting described in the KB is somehow illogical.

[quote name=‘Hetha’]We had this when we first started using CS Cart we found the solution was to change our caching system to sqlite.



In config.local find the following lines and change to read as below



// Cache backend

// Available backends: file, sqlite, mysql, shmem

$config[‘cache_backend’] = ‘sqlite’;





You can also manually clear the payments cache in admin by clicking payment methods and adding &cc to the end of the url but you may need to do this several times a day



Hope this helps



Hetha[/QUOTE]



Hetha, your comments did lead us down a path that seemed to help.



We first changed “$config[‘cache_backend’] = ‘file’;” to “$config[‘cache_backend’] = ‘mysql’;” but saw no performance gain.



After doing a little more reading and analyzing http logs we decided that the issue may stem from page caching. We deleted the following files:



/htdocs/demo/var/cache

/htdocs/demo/var/compiled/customer



The “Placing the order. Please be patient…” message only appears for 3-5 seconds now. We are still not entirely sure if this is a bug or a misconfiguration in setup.



We are considering creating a cron job to delete these files on a regular basis. We would run them durring off hours as to have a minimal impact on users.



Any opinions?

Did not mean to come across as “brash”. I simply would not add anymore spice to the soup until I understood what was causing it to taste as it does.

Suggest you remove the whole var/compiled directory, not just the customer subdirectory.



You can accomplish the same thing from your admin panel by simply adding a ?cc or &cc to the end of your URL.



I would NOT use mysql as the backend. The registry caches DB queries. Hence you are caching what you’re caching. Several other threads in the forum discuss this. The best seems to be ‘sqlite’ for the Registry cache.

[quote name=‘tbirnseth’]Suggest you remove the whole var/compiled directory, not just the customer subdirectory.



You can accomplish the same thing from your admin panel by simply adding a ?cc or &cc to the end of your URL.



I would NOT use mysql as the backend. The registry caches DB queries. Hence you are caching what you’re caching. Several other threads in the forum discuss this. The best seems to be ‘sqlite’ for the Registry cache.[/QUOTE]





Thank you, that is some very good insight. We will look over this today.

I use to have this problem on 2.0.15, but when I upgraded to 2.1.1 the problems dissapeared with the new cache method



Try sqlite cache but you need to enable dso and some other stuff for it



What version cs-cart u on?



GL

If he has an option of what backend to use then he’s already on 2.1.x

[quote name=‘tbirnseth’]If he has an option of what backend to use then he’s already on 2.1.x[/QUOTE]



To me this appears to be a cache problem because when I had the problem if I cleared the cache then the checkout would work fine



So I am suprised that with the improved cache methods he is still having this issue…