Prev | Current Page 636 | Next

Emilian Balanescu and Cristian Darie

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

tpl"}
{include file="departments_list.tpl"}
{include file=$obj->mCategoriesCell}
{include file=$obj->mCartSummaryCell}
{/if}





11. Modify your presentation/templates/cart_details.tpl file to redirect the user to the checkout_info
page instead of PayPal. The Place Order button becomes the Checkout link:
...




{if $obj->mShowCheckoutLink}

{/if}



Total amount: 
${$obj->mTotalAmount}





Checkout


{/if}
...
12. Modify the CartDetails class in presentation/cart_details.php by adding two new public
members:
...
public $mRecommendations;
public $mLinkToCheckout;
public $mShowCheckoutLink = false;
CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 537
// Private attributes
private $_mItemId;
...
13. Update the init() method of the CartDetails class by deleting the PayPal code and adding the highlighted
code in its place (it??™s OK to delete it because we have placed the PayPal link code in checkout_info.php):
...
/* Calculate the total amount for the shopping cart
before applicable taxes and/or shipping */
$this->mTotalAmount = ShoppingCart::GetTotalAmount();
// Display Checkout link in the shopping cart
if ($this->mTotalAmount != 0 && Customer::IsAuthenticated())
{
$this->mLinkToCheckout = Link::ToCheckout();
$this->mShowCheckoutLink = true;
}
// Get shopping cart products
$this->mCartProducts =
ShoppingCart::GetCartProducts(GET_CART_PRODUCTS);
.


Pages:
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648
texas holdem zasady poker online nieruchomości szczecin serwis laptopów akademia kyokushin