Hi,

I hope this is the right category for this question, but I'm looking for some design tips about writing my own add ons, and especially about protecting it from upgrades to core zen cart.

A bit of background about the add on I've written... I wanted an optional shipping insurance module, but I wanted to be able to select if the insurance was wanted at the first page of the checkout (where you select postage) and if selected it is added in order totals at step 2 of the checkout. This functionality is slightly different to the optional insurance mod that is going around as that all happens on page 2 and doesn't get reflected in order totals until step 3.

To protect this add on from upgrades I decided to put most of the logic in an Order Total mod and in the admin pages all the configuration for the mod is done there. This should be ok I think. For the piece at step 1 of checkout I've used the override facility and changed \includes\templates\CUSTOM\checkout_shipping\tpl_checkout_shipping_default.php to display a checkbox, and this should be ok too.

The bit that I had trouble with is I want to save the checkbox selection in the session but the only way I could find to get it from the $_POST variable was by modifying \includes\modules\pages\checkout_shipping\header_php.php which I couldn't find how to override correctly. This will get clobbered in an upgrade I believe so looking to eliminate this.

Does anyone have any pointers on 1. Doing this a bit smarter, or 2. Eliminating the need to edit header_php.php?

Thanks,
Anthony.