Ok! I found the debugging module and uploaded it (thx it worked!!!) i am running 1.3.8 and installed the Optional Insurance Module.
I set myself up as a customer in the US with a valid email.
this is the error I received during checkout success:
PHP Warning: constant() [<a href='function.constant'>function.constant</a>]: Couldn't find constant MODULE_ORDER_TOTAL_INSURANCE_ZONE_2 in /home/knott9/public_html/zencart/includes/modules/order_total/ot_insurance.php on line 43
This is how that module reads:
<?php
/**
* Order Total Module
*
*
* @package - Optional Insurance
* @copyright Copyright 2007 Numinix Technology <http://www.numinix.com>
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license <http://www.zen-cart.com/license/2_0.txt> GNU Public License V2.0
*
@version $Id: v2.10 12/28/2007 19:40:59Z numinix $
*/
if ($_SESSION['shipping']['id'] == 'storepickup_storepickup') {
class ot_insurance extends base{
function process() {
}
}
} else {
class ot_insurance {
var $title, $output, $num_zones, $enabled, $dest_zone;
function ot_insurance()
{
global $order, $currencies, $db;
$this->code = 'ot_insurance';
$this->title = MODULE_ORDER_TOTAL_INSURANCE_TITLE;
$this->description = MODULE_ORDER_TOTAL_INSURANCE_DESCRIPTION;
$this->enabled = ((MODULE_ORDER_TOTAL_INSURANCE_STATUS == 'true') ? true : false);
$this->sort_order = MODULE_ORDER_TOTAL_INSURANCE_SORT_ORDER;
$this->credit_class = 'true';
$this->output = array();
$geozones = $db->Execute("SELECT * FROM " . TABLE_GEO_ZONES);
$this->num_zones = $geozones->RecordCount();
if ($this->enabled == true) {
$this->dest_zone = 0;
for ($i=1; $i<=$this->num_zones; $i++) {
if ((int)constant('MODULE_ORDER_TOTAL_INSURANCE_ZONE_' . $i) > 0) {
$check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . constant('MODULE_ORDER_TOTAL_INSURANCE_ZONE_' . $i) . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
while (!$check->EOF) {
if ($check->fields['zone_id'] < 1) {
$this->dest_zone = $i;
break;
} elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
$this->dest_zone = $i;
break;
}
$check->MoveNext();
} // end while
} // END if ((int)constant('MODULE_ORDER_TOTAL_INSURANCE_ZONE_' . $i) > 0)
} // END for ($i=1; $i<=$this->num_zones; $i++)
if ($this->dest_zone < 1) {
$this->enabled = false;
}
}
I have set up USPS insurance in my store as Zone 2 with no tax zone. it specifies that only US residents (all states) are in this Zone 2.
Is there something I'm forgetting to do?
Thanks for all your help :smile:
April