codeigniter com cart

Solutions on MaxInterview for codeigniter com cart by the best coders in the world

showing results for - "codeigniter com cart"
Niko
31 Jan 2021
1$data = array(
2        'id'      => 'sku_123ABC',
3        'qty'     => 1,
4        'price'   => 39.95,
5        'name'    => 'T-Shirt',
6        'options' => array('Size' => 'L', 'Color' => 'Red')
7);
8
9$this->cart->insert($data);
10
Mailys
21 Jan 2019
1$data = array(
2        'id'      => 'sku_123ABC',
3        'qty'     => 1,
4        'price'   => 39.95,
5        'name'    => 'T-Shirt',
6        'options' => array('Size' => 'L', 'Color' => 'Red')
7);
8
9$this->cart->insert($data);
10
Henry
05 Jan 2020
1$this->load->library('cart');
2
Luisa
12 Mar 2017
1<?php echo form_open('path/to/controller/update/method'); ?>
2
3<table cellpadding="6" cellspacing="1" style="width:100%" border="0">
4
5<tr>
6        <th>QTY</th>
7        <th>Item Description</th>
8        <th style="text-align:right">Item Price</th>
9        <th style="text-align:right">Sub-Total</th>
10</tr>
11
12<?php $i = 1; ?>
13
14<?php foreach ($this->cart->contents() as $items): ?>
15
16        <?php echo form_hidden($i.'[rowid]', $items['rowid']); ?>
17
18        <tr>
19                <td><?php echo form_input(array('name' => $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?></td>
20                <td>
21                        <?php echo $items['name']; ?>
22
23                        <?php if ($this->cart->has_options($items['rowid']) == TRUE): ?>
24
25                                <p>
26                                        <?php foreach ($this->cart->product_options($items['rowid']) as $option_name => $option_value): ?>
27
28                                                <strong><?php echo $option_name; ?>:</strong> <?php echo $option_value; ?><br />
29
30                                        <?php endforeach; ?>
31                                </p>
32
33                        <?php endif; ?>
34
35                </td>
36                <td style="text-align:right"><?php echo $this->cart->format_number($items['price']); ?></td>
37                <td style="text-align:right">$<?php echo $this->cart->format_number($items['subtotal']); ?></td>
38        </tr>
39
40<?php $i++; ?>
41
42<?php endforeach; ?>
43
44<tr>
45        <td colspan="2"> </td>
46        <td class="right"><strong>Total</strong></td>
47        <td class="right">$<?php echo $this->cart->format_number($this->cart->total()); ?></td>
48</tr>
49
50</table>
51
52<p><?php echo form_submit('', 'Update your Cart'); ?></p>
53
Bailey
09 Jan 2018
1$this->cart
2
Nick
17 Jul 2017
1$data = array(
2        'id'      => 'sku_123ABC',
3        'qty'     => 1,
4        'price'   => 39.95,
5        'name'    => 'T-Shirt',
6        'coupon'         => 'XMAS-50OFF'
7);
8
9$this->cart->insert($data);
10
Mathilda
25 Sep 2017
1$data = array(
2        'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
3        'qty'   => 3
4);
5
6$this->cart->update($data);
7
8// Or a multi-dimensional array
9
10$data = array(
11        array(
12                'rowid'   => 'b99ccdf16028f015540f341130b6d8ec',
13                'qty'     => 3
14        ),
15        array(
16                'rowid'   => 'xw82g9q3r495893iajdh473990rikw23',
17                'qty'     => 4
18        ),
19        array(
20                'rowid'   => 'fh4kdkkkaoe30njgoe92rkdkkobec333',
21                'qty'     => 2
22        )
23);
24
25$this->cart->update($data);
26
Alban
10 Aug 2016
1$data = array(
2        array(
3                'id'      => 'sku_123ABC',
4                'qty'     => 1,
5                'price'   => 39.95,
6                'name'    => 'T-Shirt',
7                'options' => array('Size' => 'L', 'Color' => 'Red')
8        ),
9        array(
10                'id'      => 'sku_567ZYX',
11                'qty'     => 1,
12                'price'   => 9.95,
13                'name'    => 'Coffee Mug'
14        ),
15        array(
16                'id'      => 'sku_965QRS',
17                'qty'     => 1,
18                'price'   => 29.95,
19                'name'    => 'Shot Glass'
20        )
21);
22
23$this->cart->insert($data);
24
Klara
27 Mar 2020
1$data = array(
2        'rowid'  => 'b99ccdf16028f015540f341130b6d8ec',
3        'qty'    => 1,
4        'price'  => 49.95,
5        'coupon' => NULL
6);
7
8$this->cart->update($data);
9
queries leading to this page
codeigniter cart demoshopping cart library codeigniterhow to sum the quantity of same color in codeignitercodeigniter cart methodscodeigniter 4 cart libraryadd product purchase limit in codeigniter cartadd to cart in codeigniter examplesetm aximum qty limit on cart in codeignitercodeigniter com carthow to shopping cart in codeigniterphp codeigniter cart destoryadd to cart in codeigniter 24this 3ecart 3edestroy 28 29 returnadd to cart code in codeigniter 4displaying the cart codeignitercodeigniter add to cartadd to cart item in codeignitercart library in codeigniterhow to add cart library in codeignitercodeigniter 4 cartcart library tutorial codeigniter 3 shopping cartcart codeigniterhow to add cart libray in codeignatorcart in codeigniter demo with codecart in codeigniteradd to cart codeignitercodeigniter shop cartget cart in codeigniterci cart guidecodeigniter cart examplecodeigniter add to cart working for some itemscart in codeigniter demowrite a class for storing item information as under 3a a 29 id 2c b 29 name 2c c 29 price implement shopping cart which provide the following functionalities a 29 maintain collection of items b 29 additem 28 29 c 29 deleteitem 28 29 d 29 cartvalue 28 29 2f 2f returns total cart valuecodeigniter cart functionalitycart library for codeignitercart system in codeignitercart on codeignitercodeigniter 3 cartshopping cart in codeignitercodeigniter 3 product description 22codeigniter 4 22 cartcodeigniter cart librarycodeigniter manual cart librarycodeigniter cartshopping cart in codeigniter source codecodeigniter shopping cartcart class in codeignitercodeigniter com cart