• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
view one cart details using get rowid

#1
[eluser]ekarudianto[/eluser]
so here's my problem.. i get confused to get specific value from my cart for the update in my view..

could you guys tell me what to do..

it's the exact function like getting the id from database which is usually goes like this :

Code:
function get ($id='') {

$this->db->query (select * from table where id = $id ); }

I know the function for updating in cart codeigniter .. but i really don't know how to get the details value for it... please help me...

#2
[eluser]pickupman[/eluser]
You would need to get the contents of the cart, and then use the rowid to display the item.
Code:
$cart = $this->cart->contents();

echo $cart['your rowid'];

// or
foreach ($cart as $item)
{
  echo $item['qty'] . ' x ' . $item['price] . ' ' . $item['name'];
}

#3
[eluser]ekarudianto[/eluser]
[quote author="pickupman" date="1367604872"]You would need to get the contents of the cart, and then use the rowid to display the item.
Code:
$cart = $this->cart->contents();

echo $cart['your rowid'];

// or
foreach ($cart as $item)
{
  echo $item['qty'] . ' x ' . $item['price] . ' ' . $item['name'];
}
[/quote]

thanks for your input, I should try though...

#4
[eluser]ekarudianto[/eluser]
well it worked, well the problem is that i want the details of one rowid that i selected though... hmmm could you give me another solution regarding the problem above???

#5
[eluser]ekarudianto[/eluser]
[quote author="ekarudianto" date="1367898490"]well it worked, well the problem is that i want the details of one rowid that i selected though... hmmm could you give me another solution regarding the problem above???[/quote]

nope solved by myself... thanks for your concern Smile


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.