View Single Post
  #2  
Old 08-09-2015, 11:49 PM
  aneel13's Avatar 
aneel13 aneel13 is offline
 

Senior Member
  
Join Date: Jul 2015
Location: Dubai
Posts: 148
 

Default Re: Fetch Cart Content

I was able to fetch the information using the following piece of code:

foreach($this->getCart()->getItems() as $item){

$listItems[$count] = array( "ItemId"=> $item->getSku(),
"ItemDescription"=>$item->getName(),
"ItemQuantity"=>$item->getAmount(),
"ItemPrice"=>$item->getItemPrice(),
"ItemTotalAmount"=>$item->calculateTotal(),
"ItemImageURL"=>$item->getImageURL(),
);

$orderTotalAmount += $item->calculateTotal();
$count++;

}
__________________
Regards,
Aneel Sarwar
X-Cart version: 5.2.10
Windows: 7
Modules: Free version modules
Reply With Quote