[eluser]coma[/eluser]
open file : Paypal_lib.php
change code below :
Code:
$this->add_field('cmd','_xclick');
to
Code:
// you can call this function in your controller
$this->multi_items('true'); // true = multiple items, false = single item
create new function in paypal_lib.php
Code:
function multi_items($value)
{
if($value == "true")
{
$this->add_field('cmd','_cart');
$this->add_field('upload','1');
}else{
$this->add_field('cmd','_xclick');
}
}
Loop buyer product list or use code below to test it
Code:
$this->paypal_lib->add_field('item_name_1','abc');
$this->paypal_lib->add_field('item_number_1','1');
$this->paypal_lib->add_field('amount_1','2');
$this->paypal_lib->add_field('quantity_1', '10');
$this->paypal_lib->add_field('item_name_2','abc123');
$this->paypal_lib->add_field('item_number_2','2');
$this->paypal_lib->add_field('amount_2','5');
$this->paypal_lib->add_field('quantity_2', '15');
IT'S DONE !!
Thankx