Prev | Current Page 362 | Next

Emilian Balanescu and Cristian Darie

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

Open products_list.tpl from the presentation/templates folder, and modify it as shown:


Price:
{if $obj->mProducts[k].discounted_price != 0}
{$obj->mProducts[k].price}
{$obj->mProducts[k].discounted_price}
{else}
{$obj->mProducts[k].price}
{/if}


{* The Add to Cart form *}
action="{$obj->mProducts[k].link_to_add_product}">
{* Generate the list of attribute values *}


{* Parse the list of attributes and attribute values *}
{section name=l loop=$obj->mProducts[k].attributes}
{* Generate a new select tag? *}
{if $smarty.section.l.first ||
$obj->mProducts[k].attributes[l].attribute_name !==
$obj->mProducts[k].attributes[l.index_prev].attribute_name}
{$obj->mProducts[k].attributes[l].attribute_name}:
CHAPTER 9 ?–  RECEIVING PAYMENTS USING PAYPAL 257

{/if}
{/section}


{* Add the submit button and close the form *}






{if $smarty.


Pages:
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374