Prev | Current Page 488 | Next

Emilian Balanescu and Cristian Darie

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

name}
({$obj->mSavedCartProducts[j].attributes})


${$obj->mSavedCartProducts[j].price}


Move to cart
Remove


{/section}

{/if}
{if $obj->mLinkToContinueShopping}

Continue Shopping


{/if}
CHAPTER 12 ?–  CREATING YOUR OWN SHOPPING CART 390
4. Open presentation/link.php, and modify the ToCart() method from the Link class as highlighted here:
// Create a shopping cart link
public static function ToCart($action = 0, $target = null)
{
$link = '';
switch ($action)
{
case ADD_PRODUCT:
$link = 'index.php?CartAction=' . ADD_PRODUCT . '&ItemId=' . $target;
break;
case REMOVE_PRODUCT:
$link = 'index.php?CartAction=' .
REMOVE_PRODUCT . '&ItemId=' . $target;
break;
case UPDATE_PRODUCTS_QUANTITIES:
$link = 'index.php?CartAction=' . UPDATE_PRODUCTS_QUANTITIES;
break;
case SAVE_PRODUCT_FOR_LATER:
$link = 'index.php?CartAction=' .
SAVE_PRODUCT_FOR_LATER . '&ItemId=' . $target;
break;
case MOVE_PRODUCT_TO_CART:
$link = 'index.php?CartAction=' .
MOVE_PRODUCT_TO_CART . '&ItemId=' . $target;
break;
default:
$link = 'cart-details/';
}
return self::Build($link);
}
5. Add the following styles to the tshirtshop.css file from the styles folder:
.


Pages:
476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500
Turcja 1 mimre.benton.pl Biuro księgowe Lublin Fundusze Emerytalne petrozawodzkich.waw.pl