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
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25856
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
admin
(Support Team)
User admin
Name: Admin
05.08.2010
Posts: 25856
Quote
Aw: Get product id or name

$cart->products - array


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

 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.