zlack Posted May 18, 2003 Posted May 18, 2003 i want to adjust the cod to display a part of the total price in it. this is what i added: // Comfortcard Addon $blah = ($cart->show_total()); switch ($blah): case ($blah > 3000): $cc_factor = 0.0209; break; case ($blah > 1500): $cc_factor = 0.0224; break; case ($blah > 500): $cc_factor = 0.0259; break; case ($blah > 200): $cc_factor = 0.0517; break; default: // Comfort Card not possible $cc_factor = 1; endswitch; $blah2 = $blah * $cc_factor; $comfortcard_price= number_format($blah2,2); // End comfortcard Addon and it has to be added with the title: $this->code = 'permaand' . $comfortcard_price; $this->title = MODULE_PAYMENT_PERMAAND_TEXT_TITLE; but i get errors when i try it. it doesnt look bad php code for me, but who am i :) anyone can point me in the right direction? thanks, zlack It's easier to remember, then to forget
zlack Posted May 18, 2003 Author Posted May 18, 2003 the error i get is this: Fatal error: Call to a member function on a non-object It's easier to remember, then to forget
Recommended Posts
Archived
This topic is now archived and is closed to further replies.