Modifying the Shipping Information During Checkout
Introduction.
Now we want to allow the user to not have to use the shipping address and
name in their profile for each order. This can be quite important
since while the billing is almost surely going to be the same as what is
in the profile for each order, the shipping information might well
chaneg with every order. So we need to do several things.
We have developed this page so it is a sticky form to retain whatever the shopper has previously entered. It also posts to itself so that error messages are at the top of the page in red. This page should be called checkout_modify_shipping.php. This page is quite long because it has the sticky form for the shipping information as well as the input validation. |
<html> <!-- checkout_modify_shipping.php - modifying shipping info for this order --> <head><title>Modifying the Shipping for this Order</title></head> <?php include("includes/header.php"); include("includes/connection_config.php"); ?> <font size="4" color="a66838"><p align="center">You can modify the shipping address <br>for this order only. <br>This information will not be posted to your profile.</p></font> <?php // if this is the first time the form has been opened we want to initialize the // entries to what has been obtained from the profile and is contained in the // appropriate $_SESSION variables if (!(isset($submit_shipping))) {
}
} |
In many respects this is just the capabilities to
update the shipping so the code structure will be very similar to
what we have done in other places when updating the profile.
We only need to focus on the shipping information and form. A general code description follows.
This leads us to the last page of our website. |