summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries/cart.html
diff options
context:
space:
mode:
authorPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
committerPascal Kriete <pascal.kriete@ellislab.com>2010-11-04 22:59:52 +0100
commite917f9be8b05c81357c1c2c9730d5060685d644d (patch)
treeb6a7d5ce8ba57b69ba61454f77829b04f2ce5974 /user_guide/libraries/cart.html
parent5b2d2da5ae2e97043c6bef53e565d30e50196e2b (diff)
parente1f6e9ddff788f6a154f5f35dc117d14aeb0c484 (diff)
Automated merge with http://hg.ellislab.com/CodeIgniter2
Diffstat (limited to 'user_guide/libraries/cart.html')
-rw-r--r--user_guide/libraries/cart.html18
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);
&lt;?php foreach($this->cart->contents() as $items): ?>
&lt;?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
-
+
&lt;tr>
&lt;td>&lt;?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?>&lt;/td>
&lt;td>
&lt;?php echo $items['name']; ?>
-
+
&lt;?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>
-
+
&lt;p>
&lt;?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>
-
+
&lt;strong>&lt;?php echo $option_name; ?>:&lt;/strong> &lt;?php echo $option_value; ?>&lt;br />
-
+
&lt;?php endforeach; ?>
&lt;/p>
-
+
&lt;?php endif; ?>
-
+
&lt;/td>
&lt;td style="text-align:right">&lt;?php echo $this->cart->format_number($items['price']); ?>&lt;/td>
&lt;td style="text-align:right">$&lt;?php echo $this->cart->format_number($items['subtotal']); ?>&lt;/td>