O'Reilly logo

PHP 5 e-commerce Development by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Delivery address

Firstly, we check to see if the customer is submitting the delivery address form, if he/she is, then we sanitize the address details and set the delivery address with the following code:

private function setDelivery() { // Checking to see if the set_delivery_address post field has been // set, indicates that the customer has set their delivery address. if( isset( $_POST['set_delivery_address'] ) ) { // save delivery address // We then call the basket's setDeliveryAddress method, which // saves the default delivery address. This method takes a series // of strings as its parameters. These strings are inserted // directly into the database, so we must sanitize them first, // using the databases sanitizeData method. $this->basket->setDeliveryAddress( ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required