Prev | Current Page 630 | Next

Emilian Balanescu and Cristian Darie

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


CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 530
Figure 16-9. Customers with incomplete details cannot place orders
At this point, the customer also has the option to change the credit card or address details,
using the functionality you implemented earlier.
Let??™s implement the checkout_info componentized template you saw in Figure 16-9.
Exercise: Implementing the checkout_info Componentized Template
1. Create a new file named checkout_info.tpl in the presentation/templates folder, and add the following
code to it:
{* checkout_info.tpl *}
{load_presentation_object filename="checkout_info" assign="obj"}

Your order consists of the following items:









{section name=i loop=$obj->mCartItems}



CHAPTER 16 ?–  MANAGING CUSTOMER DETAILS 531



{/section}
Product NamePriceQuantitySubtotal
{$obj->mCartItems[i].name} ({$obj->mCartItems[i].attributes}){$obj->mCartItems[i].price}{$obj->mCartItems[i].quantity}{$obj->mCartItems[i].subtotal}

Total amount: ${$obj->mTotalAmount}


{if $obj->mNoCreditCard == 'yes'}

No credit card details stored.


{else}

{$obj->mCreditCardNote}


{/if}
{if $obj->mNoShippingAddress == 'yes'}

Shipping address required to place order.


Pages:
618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642

Hotel spa bilety lotnicze Noclegi Władysławowo koszule korporacyjne Apartamenty nad morzem