$this->mLinkToCancelPage);
exit();
}
}
}
?>
11. Open presentation/link.php, and add the following four methods to the Link class:
// Creates a link to the register customer page
public static function ToRegisterCustomer()
{
return self::Build('register-customer/', 'https');
}
// Creates a link to the update customer account details page
public static function ToAccountDetails()
{
return self::Build('account-details/', 'https');
}
CHAPTER 16 ?– MANAGING CUSTOMER DETAILS 526
// Creates a link to the update customer credit card details page
public static function ToCreditCardDetails()
{
return self::Build('credit-card-details/', 'https');
}
// Creates a link to the update customer address details page
public static function ToAddressDetails()
{
return self::Build('address-details/', 'https');
}
12. Also in the Link class modify the CheckRequest() method as highlighted here:
// Redirects to proper URL if not already there
public static function CheckRequest()
{
$proper_url = '';
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']))
{
return ;
}
// Obtain proper URL for category pages
elseif (isset ($_GET['DepartmentId']) && isset ($_GET['CategoryId']))
13.
Pages:
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638