Prev | Current Page 483 | Next

Emilian Balanescu and Cristian Darie

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

tpl *}
{load_presentation_object filename="cart_summary" assign="obj"}
{* Start cart summary *}

Cart Summary


{if $obj->mEmptyCart}

Your shopping cart is empty!


{else}


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




{/section}





{$obj->mItems[i].quantity} x

{$obj->mItems[i].name} ({$obj->mItems[i].attributes})

${$obj->mTotalAmount}

[ View details ]


{/if}

{* End cart summary *}
6. Open .htaccess, and add the following lines:
# Rewrite cart details pages
RewriteRule ^cart-details/?$ index.php?CartAction [L]
7. Add the following styles to the tshirtshop.css file from the styles folder:
.empty-cart {
margin: 0px;
padding: 5px 10px;
}
CHAPTER 12 ?–  CREATING YOUR OWN SHOPPING CART 384
table.cart-summary {
font-size: 85%;
margin: 0px;
padding: 0px 5px;
}
table.cart-summary td {
border: none;
}
table.cart-summary td.cart-summary-subtotal {
border-top: 1px solid #C6E1EC;
padding: 5px 5px;
}
How It Works: Displaying the Cart Summary
If you reload TShirtShop, you??™ll now see the cart summary box on the left side of the page.


Pages:
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
Apartamenty Świnoujście noclegi hel Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe