Ejemplo 1: carrito de codeigniter.com
$this->load->library('cart');
Ejemplo 2: carrito de codeigniter.com
$data = array(
'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
'qty' => 1,
'price' => 49.95,
'coupon' => NULL
);
$this->cart->update($data);
Ejemplo 3: carrito de codeigniter.com
$data = array(
'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
'qty' => 3
);
$this->cart->update($data);
// Or a multi-dimensional array
$data = array(
array(
'rowid' => 'b99ccdf16028f015540f341130b6d8ec',
'qty' => 3
),
array(
'rowid' => 'xw82g9q3r495893iajdh473990rikw23',
'qty' => 4
),
array(
'rowid' => 'fh4kdkkkaoe30njgoe92rkdkkobec333',
'qty' => 2
)
);
$this->cart->update($data);
Ejemplo 4: carrito de codeigniter.com
<tablecellpadding="6"cellspacing="1"style="width:100%"border="0"><tr><th>QTYth><th>Item Descriptionth><thstyle="text-align:right">Item Priceth><thstyle="text-align:right">Sub-Totalth>tr>cart->contents() as $items): ?><tr><td> $i.'[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '5')); ?>td><td>cart->has_options($items['rowid']) == TRUE): ?><p>cart->product_options($items['rowid']) as $option_name => $option_value): ?><strong>:strong><br/>p>td><tdstyle="text-align:right">cart->format_number($items['price']); ?>td><tdstyle="text-align:right">$cart->format_number($items['subtotal']); ?>td>tr><tr><tdcolspan="2">td><tdclass="right"><strong>Totalstrong>td><tdclass="right">$cart->format_number($this->cart->total()); ?>td>tr>table><p>p>
Ejemplo 5: carrito de codeigniter.com
$data = array(
array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'options' => array('Size' => 'L', 'Color' => 'Red')
),
array(
'id' => 'sku_567ZYX',
'qty' => 1,
'price' => 9.95,
'name' => 'Coffee Mug'
),
array(
'id' => 'sku_965QRS',
'qty' => 1,
'price' => 29.95,
'name' => 'Shot Glass'
)
);
$this->cart->insert($data);
Ejemplo 6: carrito de codeigniter.com
$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'coupon' => 'XMAS-50OFF'
);
$this->cart->insert($data);
Ejemplo 7: carrito de codeigniter.com
$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'options' => array('Size' => 'L', 'Color' => 'Red')
);
$this->cart->insert($data);
Ejemplo 8: carrito de codeigniter.com
$data = array(
'id' => 'sku_123ABC',
'qty' => 1,
'price' => 39.95,
'name' => 'T-Shirt',
'options' => array('Size' => 'L', 'Color' => 'Red')
);
$this->cart->insert($data);
Ejemplo 9: carrito de codeigniter.com
$this->cart
Si haces scroll puedes encontrar las críticas de otros sys admins, tú igualmente puedes insertar el tuyo si te apetece.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)