Forums / Addon Shipping Modules / Optional Shipping Insurance Module [Support Thread]

Optional Shipping Insurance Module [Support Thread]

Views: 168,601

Results 21 to 40 of 416
20 Mar 2007, 2:09 AM
#21
briank58 avatar

briank58

New Zenner

Join Date:
Mar 2007
Posts:
17
Plugin Contributions:
0

Optional Shipping Insurance Module [Support Thread]

I need to set up shipping insurance based on several different flat rates.
The products have free shipping but require the insurance. How do I do this.

Thanks
Brian

20 Mar 2007, 2:21 AM
#22
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

Briank58:

I need to set up shipping insurance based on several different flat rates.
The products have free shipping but require the insurance. How do I do this.

Thanks
Brian

My only advice to you is to open up inlcudes/modules/order_total/ot_insurance.php and look around at the different rates (they're hard coded into the module), and see if you can adjust them to your needs. For example this section says:

                    if ($order->info['subtotal'] < 50.01) {
                        $insurance = 1.35;

If the order is less than $50.01, charge $1.35.

You may be able to do something like this, if you're charging these rates by cart total.

Good luck!

20 Mar 2007, 4:42 AM
#23
briank58 avatar

briank58

New Zenner

Join Date:
Mar 2007
Posts:
17
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Hmm ... I'm going to brush up on my PHP :wacko:

the only way I can think of that might work is to create a statement like:

if ($productID=30) {
insurance= 29.99 }

(you get the idea)

does this make sense?

Brian

20 Mar 2007, 3:01 PM
#24
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

Briank58:

Hmm ... I'm going to brush up on my PHP :wacko:

the only way I can think of that might work is to create a statement like:

if ($productID=30) {
insurance= 29.99 }

(you get the idea)

does this make sense?

Brian

It makes sense, though I believe the if statement would be a little different, I don't know if you'd need something like this:

if (int($_GET['product_id']) ??

I did a search in the developers tool kit for "product_id", perhaps doing that yourself will give you some ideas.

Then I think you'd need some sort of function in there that gets the product_id in the database if that's even able to do in that stage of the game? Then I don't know how it would take each product, then add up all the insurances?? Seems complicated to me. My point is, I'm not sure if the above code is enough
I'm just a php hacker, to be honest. :thumbsup: I guess maybe I've progressed from a php hacker to a php mauler, but I'm still no guru. :lol: So, sorry for not having a better answer!!
**
ETA: Just thought of another idea, if you're having free shipping, perhaps you get close to your desired costs with the per unit shipping module, then enter different weights in the weight boxes, so that different items have higher charges. Then you could change the text from "shipping" to "insurance" with the language files....**

21 Mar 2007, 5:32 PM
#25
kenaniah avatar

kenaniah

Zen Follower

Join Date:
Jun 2005
Posts:
111
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Thanks Jettrue!

Is there an easy way to have the wording come directly after the checkbox as if it were in a table as opposed to below the checkbox.

Thanks for your help!

Michael

jettrue:

Hi there,

OK, to do this, open up includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_payment_default.

Around line 91, you'll see this section:

<fieldset> <legend><?php echo $selection[$i]['module']; ?></legend> <?php echo $selection[$i]['redeem_instructions']; ?> <div class="gvBal larger"><?php echo $selection[$i]['checkbox']; ?></div> <label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label> <?php echo $selection[$i]['fields'][$j]['field']; ?> </fieldset> ``` > > Replace it with this: > ``` <fieldset> <legend><?php echo $selection[$i]['module']; ?></legend> <?php echo $selection[$i]['redeem_instructions']; ?> <div class="gvBal larger"><?php echo $selection[$i]['checkbox']; ?></div> <?php echo $selection[$i]['fields'][$j]['field']; ?> <label class="inputLabel"<?php echo ($selection[$i]['fields'][$j]['tag']) ? ' for="'.$selection[$i]['fields'][$j]['tag'].'"': ''; ?>><?php echo $selection[$i]['fields'][$j]['title']; ?></label> <div class="clearBoth"></div> </fieldset> ```
25 Mar 2007, 6:46 AM
#26
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Old thread but I think this is where everyone would tell me to put it so..

I appear to have the module installed correctly and it shows up in the Admin-modules-order total screen and can be edited but insurance does not seem to be getting added to either USPS (which I use to non-U.S.) or UPS (all U.S. shipments.

Any common problem out there that would cause this not to work?

Maybe I missed a thread somewhere but read most/all of them.

Thanks.

25 Mar 2007, 1:23 PM
#27
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

Jeffey:

Old thread but I think this is where everyone would tell me to put it so..

I appear to have the module installed correctly and it shows up in the Admin-modules-order total screen and can be edited but insurance does not seem to be getting added to either USPS (which I use to non-U.S.) or UPS (all U.S. shipments.

Any common problem out there that would cause this not to work?

Maybe I missed a thread somewhere but read most/all of them.

Thanks.

Does it show up during the checkout for customers to select it? Can I see a link?

25 Mar 2007, 8:04 PM
#28
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Sorry, no link-local work right now.

Does not show as option on checkout (would prefer it to be mandatory/added in by the way).

Only thing to tell me it's there right now is the Admin item that appears to be fine.

Because of that I don't even know where to start!

Thanks for quick reply and any suggestions you might have.

25 Mar 2007, 8:29 PM
#29
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

Jeffey:

Sorry, no link-local work right now.

Does not show as option on checkout (would prefer it to be mandatory/added in by the way).

Only thing to tell me it's there right now is the Admin item that appears to be fine.

Because of that I don't even know where to start!

Thanks for quick reply and any suggestions you might have.

First off, make sure all of the files are uploaded.

Secondly, what is the sort order of the mod under "modules", "order total".

To do the mandatory, follow these instructions here:
http://www.zen-cart.com/forum/showpost.php?p=326864&postcount=20

(of course we'll have to get it showing up first)

25 Mar 2007, 8:54 PM
#30
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Copied the mod for later...hopefully! Thanks.

File uploading was a little bumpy at first for some reason but pretty sure they are in the right place now:
../zencart/includes/languages/english/modules/order_total/ot_insurance.php

../zencart/includes/modules/order_total/ot_insurance.php

Didn't seem to work in override places so this is where they are at now.

Fooled with sort order too but right now it is set back to default of 500.

Thanks for help.

25 Mar 2007, 9:03 PM
#31
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Dude!!!

It is there I just expected it a step before where it shows, color me embarrassed! To bleary last night to even catch it when I was at that page in the check out process.

Sorry for wasting your time though I really needed the mandatory mod so it wasn't a total waste.

It looks like the simple things are tripping me up as I've gotten a little (very) better at putting stuff together.

Got the book and getting better at hunting down the often elusive solutions already posted but gotta remember the basics!

Thanks so much for your time.

Lets see, how can I delete a forum thread...........

25 Mar 2007, 9:25 PM
#32
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Mandatory mod worked like a charm! Thanks again. I'm almost to the cosmetic only point with only a few more functionality issues to go.

Now I'll try and get this to work in my override folders though I guess theoretically they wont get overwritten anyway due to their unique names.

Just in case keeping good records of mods along with their files with copious notes so I don't blow it up next upgrade!

26 Mar 2007, 7:59 PM
#33
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Trying to get the insurance to work reasonably well for both USPS and UPS rates since I use UPS in the U.S. and USPS to other countries.

USPS with rate chart selected works great of course but then UPS rate is significantly higher than actual UPS rates because they are using USPS higher insurance rates.

I've been working with percentages to get them both to be at least close to actual cost but when I use percentage I get this message on checkout step 3:

Warning: Missing argument 2 for zen_add_tax() in ../zencart/includes/functions/functions_taxes.php on line 94

Line 94 reads (along with comment above):
////
// Add tax to a products price based on whether we are displaying tax "in" the price
function zen_add_tax($price, $tax) {

However, tax appears to be adding correctly, or not showing as it should in every place but my state but message always shows regardless.

Anyone run across this before or figured out a way to have the module work for both USPS and UPS depending on option provided at checkout?

In my case shipping method happens automatically based on U.S./non-U.S. and no choice is given.

Thanks.

27 Mar 2007, 12:22 AM
#34
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

By the way, it appears to only happen with percentage chosen as calculation method.

27 Mar 2007, 1:17 AM
#36
jeffey avatar

jeffey

Zen Follower

Join Date:
Aug 2006
Posts:
252
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Thanks.....again.

I guess most people pick one shipper or another and never have an issue.

I'll stay tuned.

6 Jul 2007, 1:28 AM
#37
studio_attivo avatar

studio_attivo

New Zenner

Join Date:
Jul 2007
Posts:
2
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Is there a way to have the Shipping Insurance Module show on the Shipping Information page instead of the Payment Information page? It makes more sense for my store. Thanks!

6 Jul 2007, 1:38 AM
#38
jettrue avatar

jettrue

Totally Zenned

Join Date:
Jan 2005
Location:
USA, St. Louis
Posts:
3,651
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

Studio Attivo:

Is there a way to have the Shipping Insurance Module show on the Shipping Information page instead of the Payment Information page? It makes more sense for my store. Thanks!

Sorry, no, as far as I've designed it, by modifying previous options, that's the way it works. If I could, I would! :hug:

6 Jul 2007, 2:32 AM
#39
studio_attivo avatar

studio_attivo

New Zenner

Join Date:
Jul 2007
Posts:
2
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

jettrue:

Sorry, no, as far as I've designed it, by modifying previous options, that's the way it works. If I could, I would! :hug:

Thanks for the quick reply. I was trying to use it for another purpose. I want to add two options to the shipping page. One option to require a signature to receive the shipment and another option to have Saturday delivery. Each option would have a cost to it that would be added to the order total. The module works great for its intended purpose. I will keep looking for another way. Thanks!

4 Sep 2007, 3:13 PM
#40
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

The Insurance module does not show the additional amount the customer has to pay, (I use Zone Rate Shipping Fee)
**
My setting: (I also include a screenshot)
Enable Insurance Module**
Do you want to enable this module? To fully turn this off, both this option and the one below should be set to false.

true

Offer Shipping Insurance?
Do you want to offer shipping insurance?

true

Sort Order
Sort order of display.
500

Use USPS Rates?
Do you want to use USPS Rates?

true

Alternate Insurance Type
If not using USPS rates, would you like to charge by percentage of cart total, or by a specific amount?

amount

Insurance Percentage
If using percent, what percentage of subtotal to charge for insurance.
5

Insurance Rate
What amount do you want to charge per increment amount.
.5

Increment Amount
For each how many dollars, ie. the increment amount, of the total(e.g. 100 here and .50 for the rate above would mean 50 cents fee for every 100 of the amount to be insured).

Amount Exempt From Fee
(Works for Increment Amounts only) Set this to the part of the total that is exempt from the Shipping Insurance. UPS insures the first $100 for free, so I set mine to 100. 0 is ok if none of the total is exempt.
0

Apply Insurance Fee To Which Orders
Apply insurance fee for orders sent to the set destination.

both

Tax Class
Use the following tax class on the insurance fee.
--none--Taxable Goods

No Insurance Fee on Virtual Products
Do not charge insurance fee when cart is Virtual Products Only

true

No Insurance Fee on Gift Vouchers
Do not charge insurance fee when cart is Gift Vouchers Only

true

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me