Contributions
Shipping Insurance 1.0
This module will calculate shipping insurance based on a RATE times the TOTAL purchase amount less any EXEMPT amount and taxes.
It is a rebuild of Gunter Sammet's earlier INSURANCE_PRERELEASE contributuion available on his website, which in turn was based on the loworderfee module from Harald Ponce de Leon.
The customer does not have a choice if he wants insurance or not... that seemed dumb to me. Who gets stuck in the end if the customer declines...? Me! So I choose.
It is especially good for UPS since it has an exempt amount and calculates the insurance as a fixed rate per so many dollars above that amount.
Shipping Insurance is posted on the invoice like tax or shipping. The exempt amount, rate, and increment values are all adjustable in the order total modules admin panel.
It also works right with Bao Nguyen's authorizenet_direct contribution with notes in the readme file on a minor adjustment needed to that contribution so that it adds into the shipping insurance to the total.
I am using it live with a snapshot from November 11, 2002. Enjoy.
Expand All / Collapse All
When calculating insurance, the order total is used. But in some cases, like in the case of having a coupon, a discount is applied to the order total and then the shipping insurance charge is reduced.
The product(s) you are selling are still worth the same amount of money, so you want the insurance to be calculated off of the order subtotal + the ship charge, not just the order total which is possibly reduced.
Included is a simple install text to fix this problem.
There is a multiplier field now in the admin panel for international shipments. This will multiply the total insurance cost by the multiplier that you set in the admin panel. This is good as most carriers charge more for international insurance.
Complete Package
Some Paypal Modules did not total correctly, this complete package has updated readme.txt file to tell what to do if the shipping insurance is not included in the total sent to Paypal.
Other payment modules may be affected as well, just try the changes outlines in step 6.
Complete package.
Added to field fixed tax
Good for to use whit Bulgarian Post.
Duhhh... well, I should have checked a little further, the order totalling was not correct on version 2.0.
This COMPLETE upload is the full package with corrections to the totalling.
================= NEWS:
Well, after so many requests, here is an update with the features most desired:
1. Site Admin can now allow customers to choose if they want shipping insurance.
2. Configuration now has field for "Minimum Charge" so you can set the minimum sharge if the total is over the minimum total the fee applies to.
3. Upgraded calculation method to work well with UPS, fixed with version 2.01 for correct totals.
4. Customer selects if they want insurance on the checkout_payment page after choosing payment method, default is yes.
This works well with UPS, may work for other kinds of shipping.
Well, after so many requests, here is an update with the features most desired:
1. Site Admin can now allow customers to choose if they want shipping insurance.
2. Configuration now has field for "Minimum Charge" so you can set the minimum sharge if the total is over the minimum total the fee applies to.
3. Upgraded calculation method to work well with UPS
4. Customer selects if they want insurance on the checkout_payment page after choosing payment method, default is yes.
This works well with UPS, may work for other kinds of shipping.
just a quick change to allow a customer to chose if they want shipping insurance.
just add this code some where on your checkout payment page:
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td class="main" width="100%" valign="top"><b>Add Shipping Insurance? <input name="ship_insurance" type="checkbox" value="1"></b></td>
<td><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
i added it just below the payment option.
then in ot_insurance.php find this:
CODEif (MODULE_ORDER_TOTAL_INSURANCE_USE == 'true') {
switch (MODULE_ORDER_TOTAL_INSURANCE_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
case 'both':
$pass = true; break;
default:
$pass = false; break;
}
replace with this:
CODEif($_POST['ship_insurance']=='1'){ if (MODULE_ORDER_TOTAL_INSURANCE_USE == 'true') {
switch (MODULE_ORDER_TOTAL_INSURANCE_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) $pass = true; break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) $pass = true; break;
case 'both':
$pass = true; break;
default:
$pass = false; break;
}}
it works fine for me :)
It's just a quick update, really. You can download here the full ot_insurance.php file that overwrites the same file in the includes/modules/order_total/ dir, or edit the existing one this way:
Find in file:
if ($pass == true) {
(around line 44)
Add this right above it:
if ($order->info['total'] < MODULE_ORDER_TOTAL_INSURANCE_OVER) {
$pass = false;
}
This way, the insurance is not added if the order's total is less than the number you set on the admin (for example, $100).
So...
Without this update, all orders below $100 will get a shipping insurance charge in negative numbers, affecting the order total.
By the way, it would be nice if this contribution had a switch to make the insurance optional on the customer's side (qith a checkbox or radio button). Right now is mandatory... (any ideas, people? Post it here!)
This module will calculate shipping insurance based on a RATE times the TOTAL purchase amount less any EXEMPT amount and taxes.
It is a rebuild of Gunter Sammet's earlier INSURANCE_PRERELEASE contributuion available on his website, which in turn was based on the loworderfee module from Harald Ponce de Leon.
The customer does not have a choice if he wants insurance or not... that seemed dumb to me. Who gets stuck in the end if the customer declines...? Me! So I choose.
It is especially good for UPS since it has an exempt amount and calculates the insurance as a fixed rate per so many dollars above that amount.
Shipping Insurance is posted on the invoice like tax or shipping. The exempt amount, rate, and increment values are all adjustable in the order total modules admin panel.
It also works right with Bao Nguyen's authorizenet_direct contribution with notes in the readme file on a minor adjustment needed to that contribution so that it adds into the shipping insurance to the total.
I am using it live with a snapshot from November 11, 2002. Enjoy.
Note: Contributions are used at own risk.