I want to add an 2% of fee when choosing Paypal. I have this code in "confirm.php" (controller/checkout)
Code: Select all
if ($this->session->data['payment_method']["id"] == "pp_standard")
{
$total_temp = substr($total_data[2]["text"], 1, 10);
$arr = array("title" => "Paypal Fee:", "text" => "$".$total_temp*0.2, "value" => $total_temp*0.2, "sort_order" => "3" );
array_push($total_data, $arr);
$total_data[2]["text"] = $total_temp+ $total_temp*0.2;
$total_data[2]["text"] = "$".$total_data[2]["text"];
$total_data[2]["value"] = $total_temp+ $total_temp*0.2;
}
Code: Select all
$this->session->data['shipping_method']['cost']
Thanks!