diff options
Diffstat (limited to 'user_guide/libraries/cart.html')
-rw-r--r-- | user_guide/libraries/cart.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/user_guide/libraries/cart.html b/user_guide/libraries/cart.html index 0dcf04acc..fb5f6621c 100644 --- a/user_guide/libraries/cart.html +++ b/user_guide/libraries/cart.html @@ -58,7 +58,7 @@ Shopping Cart Class <h1>Shopping Cart Class</h1> -<p>The Cart Class permits items to be added to a session that stays active while a user is browsing your site. +<p>The Cart Class permits items to be added to a session that stays active while a user is browsing your site. These items can be retrieved and displayed in a standard "shopping cart" format, allowing the user to update the quantity or remove items from the cart.</p> <p>Please note that the Cart Class ONLY provides the core "cart" functionality. It does not provide shipping, credit card authorization, or other processing components.</p> @@ -109,7 +109,7 @@ It is intended to be used in cases where your product has options associated wit <li><strong>options</strong> - Any additional attributes that are needed to identify the product. These must be passed via an array. </ul> -<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so +<p>In addition to the five indexes above, there are two reserved words: <dfn>rowid</dfn> and <dfn>subtotal</dfn>. These are used internally by the Cart class, so please do NOT use those words as index names when inserting data into the cart.</p> <p>Your array may contain additional data. Anything you include in your array will be stored in the session. However, it is best to standardize your data among @@ -181,24 +181,24 @@ $this->cart->insert($data); <?php foreach($this->cart->contents() as $items): ?> <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?> - + <tr> <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td> <td> <?php echo $items['name']; ?> - + <?php if ($this->cart->has_options($items['rowid']) == TRUE): ?> - + <p> <?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?> - + <strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br /> - + <?php endforeach; ?> </p> - + <?php endif; ?> - + </td> <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td> <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td> |