close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Checkout will not complete

Thread began 9/15/2010 10:26 am by SaladoGuy | Last modified 9/17/2010 1:28 pm by Jason Byrnes | 685 views | 3 replies |

SaladoGuyBeta Tester

Checkout will not complete

I'm trying to setup a simple cart for my website, I've built the site in DW CS5. After I ran the all eCart wizards, I could add an item to the cart, but when I hit the CHECKOUT button I would be immediately redirected back to the cart page (viewcart.php).
I noticed that the "get contents" function on the checkout.php page was below the "redirect if empty" function. I reversed the order of the functions, and I could proceed from viewcart.php to checkout.php. I had the same problem when clicking CHECKOUT on the checkout.php page. The same functions (get contents and redirect) were out of order in the checkout_success.php page, I reversed them but was unable to proceed with the checkout.

I tried deleting everything from the site that had anything to do with WebAssist, ran all eCart wizards again, still the same problems.

I set up a new site & database, ran all eCart wizards, this time the above mentioned functions were in the correct order, and I could take the checkout process successfully through, until I would click CHECKOUT on confirm.php. When CHECKOUT is clicked the checkout_success.php is being immediately redirected to confirm.php, no data was sent to the database either.

Attached are the checkout files for the first mentioned site, and all files from the second "fresh" site.

Thanks in advance for any input!

Sign in to reply to this post

Jason ByrnesWebAssist

It may be that the server has disabled the $_SERVER["HTTP_REFERER"] so the curant page submit check is failing.


try changing line 17:

php:
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)))     {




and change line 237 - 238:

php:
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)))     {



and line 298 - 299:

php:
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST)) // Trigger

{



to:
to:

php:
if(isset($_POST['Submit_order'])) {
Sign in to reply to this post

SaladoGuyBeta Tester

I wrote a php page that echoed each of those $_SERVER variables and they were all working, including $_SERVER["HTTP_REFERER"].

But we were able to get around this by moving to a different test server (different apache installation).

Now we have a different problem, which can be seen in this ticket: showthread.php?p=74770

Sign in to reply to this post

Jason ByrnesWebAssist

see my reply to your other thread.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...