Get product id or name

07.12.2012 20:44
#1
darkovski
Joomshopping forum user no avatar
Name: darko
24.06.2012
Posts: 11
Quote
Get product id or name

Hello, i need to get product ID or product Name from the products that are in checkout box at payment. I'm trying to get them from the cookie jshopping_temp_cart. Can any body help me do this, because for new product i'm getting an empty array from the cookie db.


Joomla: 2.5
JoomShopping: Version 3.2.5
PHP: 5.2.17

Letzte Ă„nderung: 07.12.2012 20:45
 
07.12.2012 21:03
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16518
Quote
Aw: Get product id or name

Use

$cart = JModel::getInstance('cart', 'jshop');
$cart->load();


See var

$cart->products


 
08.12.2012 12:29
#3
darkovski
Joomshopping forum user no avatar
Name: darko
24.06.2012
Posts: 11
Quote
Aw: Get product id or name

How can I get the product id from this?

 
08.12.2012 14:56
#4
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16518
Quote
Aw: Get product id or name

$cart->products - array


foreach($cart->products as $prod){
$id = $prod['product_id'];
...
}

 
Copyrights MAXXmarketing GmbH. All Rights Reserved