Prev | Current Page 634 | Next

Emilian Balanescu and Cristian Darie

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

htaccess file from the project root folder, and add the highlighted rewrite rule:
# Rewrite account details pages
RewriteRule ^account-details/?$ index.php?AccountDetails [L]
# Rewrite checkout pages
RewriteRule ^checkout/?$ index.php?Checkout [L]

# Set the default 500 page for Apache errors
ErrorDocument 500 /tshirtshop/500.php
7. Open presentation/store_front.php, and modify the init() method of the StoreFront class as
shown here to correctly build the ???continue shopping??? links. $_SESSION['link_to_last_page_loaded']
and $_SESSION['customer_cancel_link'] shouldn??™t point to the checkout page.
// Build the "continue shopping" link
if (!isset ($_GET['CartAction']) && !isset($_GET['Logout']) &&
!isset($_GET['RegisterCustomer']) &&
!isset($_GET['AddressDetails']) &&
!isset($_GET['CreditCardDetails']) &&
!isset($_GET['AccountDetails']) &&
!isset($_GET['Checkout']))
$_SESSION['link_to_last_page_loaded'] = $_SESSION['link_to_store_front'];
// Build the "cancel" link for customer details pages
if (!isset($_GET['Logout']) &&
!isset($_GET['RegisterCustomer']) &&
!isset($_GET['AddressDetails']) &&
!isset($_GET['CreditCardDetails']) &&
!isset($_GET['AccountDetails']))
$_SESSION['customer_cancel_link'] = $_SESSION['link_to_store_front'];
CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 535
// Load department details if visiting a department
if (isset ($_GET['DepartmentId']))
{
$this->mContentsCell = 'department.


Pages:
622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646
Turcja 1 mimre.benton.pl Biuro księgowe Lublin Fundusze Emerytalne petrozawodzkich.waw.pl