Prev | Current Page 257 | Next

Emilian Balanescu and Cristian Darie

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

In later chapters,
you??™ll add more features to this page, such as product recommendations or product reviews.
On this page, we??™ll also implement the Continue Shopping functionality. This consists of a
Continue Shopping link at the bottom of the product details page, which links to the page the
visitor was prior to looking at a product??™s detail page. If the visitor arrives to that page by browsing
directly, or from a search engine, the Continue Shopping button will link to the home page
of the shop. Let??™s do this in the following exercise.
Exercise: Creating the product Componentized Template
1. Add the following styles to styles/tshirtshop.css:
.product-image {
border: 2px solid #c6e1ec;
}
ol {
margin: 0px;
padding: 0px 0px 0px 5px;
}
ol li {
color: #0590C7;
list-style-type: none;
margin: 0px;
padding: 5px 0px;
}
2. Now, get in touch with your artistic side, and use these CSS definitions in the product details page. Create
the product.tpl file in the presentation/templates folder. Feel free to go wild and customize this
page as you want.
{load_presentation_object filename="product" assign="obj"}

{$obj->mProduct.name}


{if $obj->mProduct.image}
alt="{$obj->mProduct.name} image" />
{/if}
{if $obj->mProduct.image_2}
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
Apartamenty Świnoujście noclegi hel Lokaty jednodniowe projekty domków letniskowych męskie skarpetki rowerowe