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
|