I want to add Commission junction to my client site, in that they asked for each product sku's and price. After the confirmation page/ success page only we need to pass thes values. But here how i can get all the product details. Including sku, price i need to pass. Is there any way to get each product details separately.
Thanks Suresh
Checkout Success extension allows you to show more details on checkout success page. You can show order details which include list of ordered products, billing and shipping information. Also you can show two static blocks with additional content and quick customer registration when order placed by guest.
Yeah you are right @leek
But if you want to add advanced setup with CJ then follow this method.
<!-- Start of CJ Integration Part -->
<?php
$_customerId = Mage::getSingleton('customer/session')->getCustomerId();
$lastOrderId = Mage::getSingleton('checkout/session')->getLastOrderId();
$order = Mage::getSingleton('sales/order');
$order->load($lastOrderId);
$_totalData =$order->getData();
$_sub = $_totalData['subtotal'];//USD ==> global_currency_code,base_currency_code order_currency_code
// Incase if it is simple do this ==> https://www.emjcd.com/u?AMOUNT= $_sub;
//print_r($order); print_r($_totalData);
$_order = $this->getOrder();
$allitems = $order->getAllItems();
$index = 1;
$cjData = "";//Needed format ==> &ITEM1=3214sku&AMT1=13.49&QTY1=1&ITEM2=6577sku&AMT2=7.99&QTY2=2&
foreach($allitems as $item)
{
$cjData.="&ITEM".$index."=".$item->getSku()."&AMT".$index."=".$item->getPrice()."&QTY".$index."=".$item->getQtyToShip();
$index++;
}
?>
<div style="display:none;">
<img src="https://www.emjcd.com/u?CID=id&OID=<?php echo $this->getOrderId(); ?>&TYPE=type<?php echo $cjData; ?>&CURRENCY=USD&METHOD=IMG" height="1" width="20">
</div>
<!-- End of CJ Integration Part -->
Its worked perfectly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With