Prev | Current Page 487 | Next

Emilian Balanescu and Cristian Darie

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

Create a new file named cart_details.tpl in the presentation/templates folder, and add the following
code to it:
{* cart_details.tpl *}
{load_presentation_object filename="cart_details" assign="obj"}
{if $obj->mIsCartNowEmpty eq 1}

Your shopping cart is empty!


{else}

These are the products in your shopping cart:











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







{/section}
Product NamePriceQuantitySubtotal 

value="{$obj->mCartProducts[i].item_id}" />
{$obj->mCartProducts[i].name}
({$obj->mCartProducts[i].attributes})
${$obj->mCartProducts[i].price}
value="{$obj->mCartProducts[i].quantity}" />
${$obj->mCartProducts[i].subtotal}
Save for later
CHAPTER 12 ?–  CREATING YOUR OWN SHOPPING CART 389
Remove








Total amount: 
${$obj->mTotalAmount}






{/if}
{if ($obj->mIsCartLaterEmpty eq 0)}

Saved products to buy later:








{section name=j loop=$obj->mSavedCartProducts}

Product NamePrice 

{$obj->mSavedCartProducts[j].


Pages:
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499
kasyno Peg Perego Vela Easy Drive bad credit loans instant decision no brokers Kocham wakacje Restauracja Oberża PRL