Prev | Current Page 494 | Next

Emilian Balanescu and Cristian Darie

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

$count_old_carts .
' old shopping carts (selected option: ' .
$this->mDaysOptions[$this->mSelectedDaysNumber] .
').';
}
// If deleting shopping carts ...
if ($this->_mAction == 'delete')
{
$this->mDeletedCarts =
ShoppingCart::DeleteOldShoppingCarts($this->mSelectedDaysNumber);
$this->mMessage = 'The old shopping carts were removed from the
database (selected option: ' .
$this->mDaysOptions[$this->mSelectedDaysNumber] .').';
}
}
}
?>
6. Create a new file in the presentation/templates folder named admin_carts.tpl, and type the
following code:
{* admin_carts.tpl *}
{load_presentation_object filename="admin_carts" assign="obj"}

Admin users' shopping carts:


{if $obj->mMessage}

{$obj->mMessage}

{/if}


Select carts:
{html_options name="days" options=$obj->mDaysOptions
selected=$obj->mSelectedDaysNumber}

CHAPTER 12 ?–  CREATING YOUR OWN SHOPPING CART 396
value="Delete Old Shopping Carts" />



7. Open presentation/link.php, and add following code at the end of the Link class:
// Create link to shopping carts administration page
public static function ToCartsAdmin()
{
return self::ToAdmin('Page=Carts');
}
8. Modify presentation/templates/admin_menu.


Pages:
482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506
Pozycjonowanie sklep ofe kontrola dostępu pozycjonowanie stron