Jump to content
Larry Ullman's Book Forums

Reloading Checkout Without Redirecting To Billing - Site Example 2


Recommended Posts

I might be having a bit of a brain freeze here, apologise if this is a daft question.

 

I add items to my cart, I click to proceed to checkout, I enter my shipping address, then when I press 'Continue to Billing' I get taking back to an empty shopping cart.

 

I thought I was making a silly error so I copied and pasted the downloaded source code and used them, and it did exactly the same things. I know in checkout.html the form submission is set to checkout.php, but I expected it to redirect me to billing.php to continue the order.

 

Any help would be greatly appreciated.

All the best

 

Skippy

 

****UPDATE****

I was indeed having a bad day lol. Was creating a new session instead of using the existing session

Link to comment
Share on other sites

  • 8 months later...

Hello,

 

It seems i have the same problem - getting redirected to cart.php after clicking 'continue to billing'.

 

Cart.php

 

// Check for the user's session ID, to retrieve the cart contents:
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
   if (isset($_GET['session'])) {
    $uid = $_GET['session'];
    // Use the existing user ID:
    session_id($uid);
    // Start the session:
    session_start();
   } else { // Redirect the user.
    $location = 'http://' . BASE_URL . '/cart.php';
    header("Location: $location");
    exit();
   }
} else { // POST request.
   session_start();
   $uid = session_id();
}

 

This is where its getting redirected to cart.php so I'm asumming I have the same problem as above but as im not the greatest programmer about I am still here with the problem.

 

Can someone point me in the right direction on how i go about fixing this problem? I can see its something to do with the session but dont know how to fix it.

Link to comment
Share on other sites

Upadte - I tried accessing the billing page using Google Chrome and found that the browser is having a problem with the SSL

 

Google Chrome states this:

 

The site uses SSL, but Google Chrome has detected either high-risk insecure content on the page or problems with the site’s certificate. Don’t enter sensitive information on this page. Invalid certificate or other serious https issues could indicate that someone is attempting to tamper with your connection to the site.

 

Can someone tell me what i maybe doing wrong?

Link to comment
Share on other sites

 Share

×
×
  • Create New...