Prev | Current Page 456 | Next

Emilian Balanescu and Cristian Darie

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


htmlspecialchars_decode(
Link::ToProductAdmin($this->_mDepartmentId,
$this->_mCategoryId,
(int)$_POST['product_id'])));
else
{
$product_locations =
Catalog::GetProductLocations((int)$_POST['product_id']);
if (count($product_locations) > 0)
{
$department_id = $product_locations[0]['department_id'];
$category_id = $product_locations[0]['category_id'];
header('Location: ' .
htmlspecialchars_decode(
Link::ToProductAdmin($department_id,
$category_id,
(int)$_POST['product_id'])));
}
}
}
CHAPTER 11 ?–  CATALOG ADMINISTRATION: PRODUCTS AND ATTRIBUTES 357
/* If searching the catalog, get the list of products by calling
the Search business tier method */
if (isset ($this->mSearchString))
{
// Get search results
$search_results = Catalog::Search($this->mSearchString,
$this->mAllWords,
$this->mPage,
$this->mrTotalPages);
14. Open presentation/store_front.php, and add the following piece of code at the beginning of the
init() method of the StoreFront class:
public function init()
{
$_SESSION['link_to_store_front'] =
Link::Build(str_replace(VIRTUAL_LOCATION, '', getenv('REQUEST_URI')));
// Create "Continue Shopping" link for the PayPal shopping cart
if (!isset ($_GET['AddProduct']))
{
15. Open presentation/admin_menu.php, and modify the constructor of the AdminMenu class like this:
public function __construct()
{
$this->mLinkToStoreAdmin = Link::ToAdmin();
$this->mLinkToAttributesAdmin = Link::ToAttributesAdmin();
if (isset ($_SESSION['link_to_store_front']))
$this->mLinkToStoreFront = $_SESSION['link_to_store_front'];
else
$this->mLinkToStoreFront = Link::ToIndex();
$this->mLinkToLogout = Link::ToLogout();
}
16.


Pages:
444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
tłumacz niemieckiego hosting zakłady bukmacherskie serwis drukarek katowice petrozawodzkich.waw.pl