Re: Problem with install sql
NOTE: on the file:
/includes/modules/order_total/ot_ot_optionalinsurance.php
you should comment the echo around line 144:
Code:
$insurance = $_SESSION['shipping']['insurance'];
//echo 'shipping insurance: ' . $_SESSION['shipping']['insurance'] . '<br>';
$selected = (($_SESSION['insurance'] == '1') ? true : false);
Re: Optional Shipping Insurance Module Support Thread...
If you look in the Modules ... Shipping ... and click on USPS and click EDIT ...
Did you check the boxes for the Insurance?
Quote:
Extra Services (Domestic)
Included in postage rates. Not shown to the customer.
WARNING: Some services cannot work with other services.
Insurance
Priority Mail Express Insurance
And for:
Quote:
Extra Services (International)
Included in postage rates. Not shown to the customer.
WARNING: Some services cannot work with other services.
Insurance
Re: Optional Shipping Insurance Module Support Thread...
I checked them and it adds insurance to the shipping amount automatically without option.
1 Attachment(s)
Re: Optional Shipping Insurance Module Support Thread...
I made a new Zip for v151 with USPS October 30, 2014 K6 with Optional Insurance for you ... in case I made any changes to these files with the new release ...
Try loading these files to your server, does it work better?
Re: Optional Shipping Insurance Module Support Thread...
It is working now! The only thing is that it is still automatically adding insurance and forcing the customer to opt out. Is that how this mod works? I want customers to be able to opt in.
Either way, coffee and donut on the way! Thanks for taking so much time with this!
Re: Optional Shipping Insurance Module Support Thread...
That is how this works ...
You would need to customize the file:
/includes/modules/order_total/ot_optionalinsurance.php
And change the setting from:
Code:
if ($display_insurance && $insurance > 0) {
$selection = array('id' => $this->code,
'module' => $this->title,
'redeem_instructions' => MODULE_ORDER_TOTAL_OPTIONALINSURANCE_TEXT_ENTER_CODE,
'fields' => array(array('field' => zen_draw_checkbox_field('opt_insurance', '1', $selected, 'id="opt_insurance"' . ($jsUpdateForm ? ' onclick="updateForm();"' : '')) . zen_draw_hidden_field('insurance', '1'),
'title' => $currencies->format($insurance, true, $order->info['currency'], $order->info['currency_value'])
)));
} else {
to read:
Code:
if ($display_insurance && $insurance > 0) {
$selection = array('id' => $this->code,
'module' => $this->title,
'redeem_instructions' => MODULE_ORDER_TOTAL_OPTIONALINSURANCE_TEXT_ENTER_CODE,
'fields' => array(array('field' => zen_draw_checkbox_field('opt_insurance', '1', true, 'id="opt_insurance"' . ($jsUpdateForm ? ' onclick="updateForm();"' : '')) . zen_draw_hidden_field('insurance', '1'),
'title' => $currencies->format($insurance, true, $order->info['currency'], $order->info['currency_value'])
)));
} else {
Re: Optional Shipping Insurance Module Support Thread...
Thanks Ajeh, but I don't like how the insurance cost is already added to the shipping costs and then showing a deduction. I was looking for something that a customer would click to add a displayed amount for insurance that would then be added to the costs. All the help is appreciated! Coffee and Donut sent!
Re: Optional Shipping Insurance Module Support Thread...
The only way this works to remove the USPS insurance is to have it added in on the checkout_shipping page and then you can remove it on the checkout_payment page ...
Remove the code change I gave you in in post #369 and see if adding this code works better for you:
Code:
$selected = (($_SESSION['insurance'] == '1') ? true : false);
//override optional setting and force decline to be checked from the start
$selected = true;
Re: Optional Shipping Insurance Module Support Thread...
Quote:
Originally Posted by
Ajeh
The only way this works to remove the USPS insurance is to have it added in on the checkout_shipping page and then you can remove it on the checkout_payment page ...
Remove the code change I gave you in in post #369 and see if adding this code works better for you:
Code:
$selected = (($_SESSION['insurance'] == '1') ? true : false);
//override optional setting and force decline to be checked from the start
$selected = true;
It still does the same thing. I didn't see any change at all...
Re: Optional Shipping Insurance Module Support Thread...
Quote:
Originally Posted by
doooomed
It still does the same thing. I didn't see any change at all...
Wow, I missed the first part never mind! Haha let me try...