Guest loren antolik Posted April 12, 2006 Share Posted April 12, 2006 how can i offer my customers insurance through the usps shipping module ? Quote Link to comment Share on other sites More sharing options...
Guest loren antolik Posted April 13, 2006 Share Posted April 13, 2006 okay, after doing some research, insurance is an additional charge that cubecart does not consider. i am building my own code to calculate the insurance. this block of code calculates the insurance charge based on the order amount (subTotal). you can apply this insurance charge to the rates that are returned from the usps $zip_dest = $basket["delInf"]["postcode"]; $countryName = countryName($basket['delInf']['country']); if($api=="IntlRate") { // get the config $module = fetchDbConfig("USPSINT"); if ( $countryName == "Canada" ) { if ( $subTotal <= 50 ) { $insuranceCharge = 1.35; } else if ( $subTotal <= 100 ) { $insuranceCharge = 2.30; } else if ( $subTotal <= 675 ){ $insuranceCharge = 2.30 + ( ( ( $subTotal - ( $subTotal % 100 ) ) / 100 ) * 1.05 ); } else { $insuranceCharge = 8.60; } } else { if ( $subTotal <= 50 ) { $insuranceCharge = 1.95; } else if ($subTotal <= 100 ) { $insuranceCharge = 2.75; } else { $insuranceCharge = 2.75 + ( ( ( $subTotal - ( $subTotal % 100 ) ) / 100 ) * 1.05 ); } } } else { // get the config $module = fetchDbConfig("USPS"); if ( $subTotal <= 50 ) { $insuranceCharge = 1.35; } else if ($subTotal <= 100 ) { $insuranceCharge = 2.30; } else { $insuranceCharge = 2.30 + ( ( ( $subTotal - ( $subTotal % 100 ) ) / 100 ) * 1.05 ); } } Quote Link to comment Share on other sites More sharing options...
Guest Duckie Posted June 24, 2006 Share Posted June 24, 2006 does this go into the calc.php? and are the customers able to choose to have insurance or not?, also for US, you would change the varible in the code? sorry fo all the questions, this would be a good addition to the shipping end Quote Link to comment Share on other sites More sharing options...
Guest Posted June 27, 2006 Share Posted June 27, 2006 This would make a great mod if the customer had the choice to take the insurance. Many customers do not like to be forced to purchase insurance. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.