Prev | Current Page 633 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

Create the checkout_not_logged.tpl file in the presentation/templates folder, and add the following
code. This is the page that we??™re displaying to an unauthenticated user trying to load the checkout
page. (Unauthenticated users don??™t see the Checkout link in the shopping cart, but they can try to load the
checkout URL nevertheless.)
{* checkout_not_logged.tpl *}


You must be logged in to CHECKOUT

If you don't have an account please register


4. Open presentation/link.php, and add the following method to the end of the Link class:
// Creates a link to the checkout page
public static function ToCheckout()
{
return self::Build('checkout/', 'https');
}
CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 534
5. In the same file, modify the CheckRequest() method from the Link class as highlighted here so it won??™t
verify checkout requests:
if (isset ($_GET['Search']) || isset($_GET['SearchResults']) ||
isset ($_GET['CartAction']) || isset ($_GET['AjaxRequest']) ||
isset ($_POST['Login']) || isset ($_GET['Logout']) ||
isset ($_GET['RegisterCustomer']) ||
isset ($_GET['AddressDetails']) ||
isset ($_GET['CreditCardDetails']) ||
isset ($_GET['AccountDetails']) || isset ($_GET['Checkout']))
{
return ;
}
// Obtain proper URL for category pages
elseif (isset ($_GET['DepartmentId']) && isset ($_GET['CategoryId']))
6. Open the .


Pages:
621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645
ubrania A*Teens Danny mapa komunikator ATB