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

Optional Shipping Insurance Module [Support Thread]

Views: 168,604

Results 361 to 380 of 416
16 Jan 2015, 6:56 PM
#361
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Optional Shipping Insurance Module [Support Thread]

aldo.campione ... out of curiosity, what shipping module(s) are you using?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Jan 2015, 8:41 PM
#362
design75 avatar

design75

Totally Zenned

Join Date:
Dec 2009
Location:
Amersfoort, The Netherlands
Posts:
2,862
Plugin Contributions:
5

Re: Optional Shipping Insurance Module [Support Thread]

It has been some years i last checked this module, but if i remember correctly the optional in this module is that you set the insurance to kick in above a certain total price in your cart.

29 Jun 2015, 2:08 AM
#363
andy_m avatar

andy_m

New Zenner

Join Date:
Apr 2015
Location:
United States
Posts:
15
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Does anyone know how I might fix this so it will work with the
edit_orders-4
module.

My insurance adds correctly in the regular order total during check-out, but whenever you edit the order using the Edit Orders 4 interface, the new order total always leaves out the Shipping Insurance amount.

???

Andy

1 Apr 2016, 10:53 PM
#364
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Optional Shipping Insurance Module [Support Thread]

@Andy_M - Did you ever find a solution to this? I am having the same problem with Edit Orders 4.1.4

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

3 Apr 2016, 4:02 PM
#365
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Optional Shipping Insurance Module [Support Thread]

Andy_M:

Does anyone know how I might fix this so it will work with the
edit_orders-4
module.

My insurance adds correctly in the regular order total during check-out, but whenever you edit the order using the Edit Orders 4 interface, the new order total always leaves out the Shipping Insurance amount.

???

Andy

jackie.taferner:

@Andy_M - Did you ever find a solution to this? I am having the same problem with Edit Orders 4.1.4
Assuming that you both are discussing the plugin that's downloaded from the Plugins' area, it's relying on checkout-based session information to determine whether it's to be enabled and will require modification to work with EO 4.1.4 (since the admin environment contains no such session information).

7 Apr 2016, 9:42 PM
#366
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Optional Shipping Insurance Module [Support Thread]

Thanks @lat9, yes I am trying to get this working on a client's site as we speak. Are there any plans to upgrade this module to not use session-based information on the backend? Or any pointers on how to accomplish this upgrade?

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

27 Apr 2016, 6:03 PM
#367
jackie_taferner avatar

jackie_taferner

Totally Zenned

Join Date:
Jun 2009
Location:
Orange County, California
Posts:
547
Plugin Contributions:
3

Re: Optional Shipping Insurance Module [Support Thread]

Ok, for anyone else looking to fix up this module for Edit Orders v4.1.4, here's a bit of a workaround, but it seems to get the job done.

YOURADMIN/edit_orders.php

Right around line 430:

			foreach($_POST['update_total'] as $order_total) {
				$order_total['text'] = $currencies->format($order_total['value'], true, $order->info['currency'], $order->info['currency_value']);
				$order_total['sort_order'] = $GLOBALS[$order_total['code']]->sort_order;

				// TODO Special processing for some modules
				if(zen_not_null($order_total['title']) && $order_total['title'] != ':') {
					switch($order_total['code']) {
						case 'ot_shipping':
							$GLOBALS['order']->info['shipping_cost'] = $order_total['value'];
							$GLOBALS['order']->info['shipping_module_code'] = $order_total['shipping_module'];
							break;

Add this code:

			//unset the insurance session before loading the next order
			$_SESSION['opt_insurance'] = false;
			foreach($_POST['update_total'] as $order_total) {
				$order_total['text'] = $currencies->format($order_total['value'], true, $order->info['currency'], $order->info['currency_value']);
				$order_total['sort_order'] = $GLOBALS[$order_total['code']]->sort_order;

				// TODO Special processing for some modules
				if(zen_not_null($order_total['title']) && $order_total['title'] != ':') {
					switch($order_total['code']) {
						//add insurance session if order has insurance
						case 'ot_insurance':
							$_SESSION['opt_insurance'] = true;
							break;
						case 'ot_shipping':
							$GLOBALS['order']->info['shipping_cost'] = $order_total['value'];
							$GLOBALS['order']->info['shipping_module_code'] = $order_total['shipping_module'];
							break;

Jackie Taferner - JT Website Design
Custom Website Design and Ecommerce
Support the community. Don't Private Message, post your questions in the forum.

19 Jan 2018, 5:28 AM
#368
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

I have a question I've upgraded my Zen Cart installation from 1.5.5e to 1.5.5f in my development server, as well as upgrading from PHP 5.6 to PHP 7.1.
I've made sure my customization php.ini definitions are migrated too.

Going through QC testing I've noticed ot_insurance no longer functions properly.
First symptom is upon a user attempts to checkout and pay for the product on index.php?main_page=checkout_payment , the screen returns blank.
Second symptom is the edit Edit and Remove buttons within the administration page of the module does not show up anymore. The module list is of course still green light. I can click on the module listing again to edit the attribute of the module that way.

According to the debug log, there's evident that something isnt compatible with the module.
[18-Jan-2018 20:08:08 America/Los_Angeles] PHP Fatal error: Uncaught Error: Call to undefined function split() in /home/www/includes/modules/order_total/ot_insurance.php:128
Stack trace:
#0 /home/www/includes/classes/order_total.php(185): ot_insurance->process()
#1 /home/www/includes/modules/pages/checkout_payment/header_php.php(101): order_total->pre_confirmation_check()
#2 /home/www/index.php(36): require('/home/apusa/ang...')
#3 {main}
thrown in /home/www/includes/modules/order_total/ot_insurance.php on line 128

Disabling, but not Removing (Since I cant do that without the button) the module will make my shopping cart work again.

Also ZC 1.5.5e and 1.5.5f works with Php 5.6 but this issue appears within Php 7.1 So far, I have no other issues with other modules, and general functionality of the cart except this module. As I'd like to force my customers to have insurance for every order.
Now, I think there's a work around using the USPS shipping insurance check box, and not using this module at all. But that is a bad work around as it does not show the customer that they are being charged for the extra service.

Any help would be greatly appreciated!

19 Jan 2018, 1:19 PM
#369
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,109
Plugin Contributions:
56

Re: Optional Shipping Insurance Module [Support Thread]

The PHP ***split ***function was deprecated (i.e. letting you know that it' going to be removed) in PHP 5.3.0 and removed totally in PHP 7.0. That's why the ot_insurance worked under PHP 5.6 but not under PHP 7.0.

If you would post the contents of /includes/modules/order_total/ot_insurance.php's function on/around line 128, perhaps someone could propose a code-change to allow that order-total to (again) operate.

19 Jan 2018, 7:54 PM
#370
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

lat9:

The PHP ***split ***function was deprecated (i.e. letting you know that it' going to be removed) in PHP 5.3.0 and removed totally in PHP 7.0. That's why the ot_insurance worked under PHP 5.6 but not under PHP 7.0.

If you would post the contents of /includes/modules/order_total/ot_insurance.php's function on/around line 128, perhaps someone could propose a code-change to allow that order-total to (again) operate.

Okay that sounds logical enough.
This is the latest version from both Numinix's website and the one uploaded in the ZC Plugins page. Version number is 3.2.2
I look the liberty checking if there other occurrence of the split and I have found two. Here they are:

Starts at Line 125
// usps still open
$table = constant('MODULE_ORDER_TOTAL_INSURANCE_COST_' . $this->dest_zone);
$table_cost = split("[:,]", $table);
$size = sizeof($table_cost);
for ($i=0, $n=$size; $i<$n; $i+=2) {
if (round($order_total_insurance,9) <= $table_cost[$i]) {
$insurance = $table_cost[$i+1];
break;
Ends at Line 132

Starts at Line 219
if (MODULE_ORDER_TOTAL_INSURANCE_TABLE == 'true') {
$table = constant('MODULE_ORDER_TOTAL_INSURANCE_COST_' . $this->dest_zone);
$table_cost = split("[:,]", $table);
$size = sizeof($table_cost);
for ($i=0, $n=$size; $i<$n; $i+=2) {
if (round($order_total_insurance,9) <= $table_cost[$i]) {
$insurance = $table_cost[$i+1];
break;
}
Ends at 227

19 Jan 2018, 8:06 PM
#371
tmccaff avatar

tmccaff

Zen Follower

Join Date:
Jan 2018
Posts:
157
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Yes split has now changed to preg_split. For those changes:

change to:

$table_cost = preg_split("/[:,]/", $table);
19 Jan 2018, 8:35 PM
#372
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

AND it appears to work! Version zc 1.5.5f and Php 7.1

Oddly enough, this module never had a Edit and Remove button apparently to start with.
I guess I'll repackage it for the site repository since everyone is supposed to migrate to 7.x anyways, as 5.6 will be EOL this coming December.

Thank you for the quick fix!

tmccaff:

Yes split has now changed to preg_split. For those changes:

change to:

$table_cost = preg_split("/[:,]/", $table);

23 Feb 2018, 8:38 PM
#373
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Another odd artifact that I've noticed now that the module worked with the above modification.
I have noticed now the built-in store pickup module cannot bypass insurance enforcement. It's annoying my customers, but I can sort of get around it by refunding the insurance amount upon pickup.
Anyone else having the same issue? And any advice on how to diagnose and perhaps find out how to actually get this mod somewhat up to date?

29 Mar 2018, 11:27 PM
#374
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Optional Shipping Insurance Module [Support Thread]

chibipaw:

Another odd artifact that I've noticed now that the module worked with the above modification.
I have noticed now the built-in store pickup module cannot bypass insurance enforcement. It's annoying my customers, but I can sort of get around it by refunding the insurance amount upon pickup.
Anyone else having the same issue? And any advice on how to diagnose and perhaps find out how to actually get this mod somewhat up to date?
A new version, 3.3.0, has been released on our website. At the top of the file there is a check for storepickup. Can you confirm if that resolves your issue chibipaw?

30 Mar 2018, 1:58 AM
#375
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

numinix:

A new version, 3.3.0, has been released on our website. At the top of the file there is a check for storepickup. Can you confirm if that resolves your issue chibipaw?

Woo hoo! And here I thought its abandoned. Alright going to start testing out the dev server tonight, and I'll let you know once I get some concrete results.
Thanks for the update ! in both the information and the new version!

30 Mar 2018, 4:33 AM
#376
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

numinix:

A new version, 3.3.0, has been released on our website. At the top of the file there is a check for storepickup. Can you confirm if that resolves your issue chibipaw?

Alright, I've installed 3.3.0 into my dev environment and this is what I have discovered so far:

If there is previous version of ot_insurance installed, one must manually delete the values MODULE_ORDER_TOTAL_INSURANCE_* under the configuration_key in the configuration table before proceeding. Otherwise this module will display a +install button in the admin menu and then fail to install these values. Probably will need an uninstall SQL script of some sort.

Once installed, this module does not appear to know it has been installed. So the +install will return to the admin menu, and edit of the module's configuration_value's is not possible without directly manipulating the database directly. With that said, the -remove button will not appear, uninstall is not possible without deleting the above keys from the table mentioned above. This is of course going to be problematic.

If using a permitted zone address was used to check out using the Store Pickup option, no insurance was charged.
But here comes to show stopper. Checkouts using the normal delivery method (USPS), does not trigger ot_insurance to charge a fee either.

31 Mar 2018, 5:18 AM
#377
numinix avatar

numinix

Totally Zenned

Join Date:
Apr 2007
Location:
Vancouver, Canada
Posts:
1,567
Plugin Contributions:
58

Re: Optional Shipping Insurance Module [Support Thread]

chibipaw:

Alright, I've installed 3.3.0 into my dev environment and this is what I have discovered so far:

If there is previous version of ot_insurance installed, one must manually delete the values MODULE_ORDER_TOTAL_INSURANCE_* under the configuration_key in the configuration table before proceeding. Otherwise this module will display a +install button in the admin menu and then fail to install these values. Probably will need an uninstall SQL script of some sort.

Once installed, this module does not appear to know it has been installed. So the +install will return to the admin menu, and edit of the module's configuration_value's is not possible without directly manipulating the database directly. With that said, the -remove button will not appear, uninstall is not possible without deleting the above keys from the table mentioned above. This is of course going to be problematic.

If using a permitted zone address was used to check out using the Store Pickup option, no insurance was charged.
But here comes to show stopper. Checkouts using the normal delivery method (USPS), does not trigger ot_insurance to charge a fee either.

The module needs to be uninstalled before uploading the new files and reinstalling. However, any future versions after 3.3.0 will auto upgrade.

31 Mar 2018, 6:19 AM
#378
chibipaw avatar

chibipaw

Zen Follower

Join Date:
Jul 2011
Posts:
167
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

numinix:

The module needs to be uninstalled before uploading the new files and reinstalling. However, any future versions after 3.3.0 will auto upgrade.

Do you know whats the procedures to cleanly uninstalling the module? perhaps manually?
v3.23 do not have the Remove button to uninstalling in the menu, as indicated in the documentation.
The best I know of is deleting the the SQL entries above and over writing the two files.

The closest thing I can see is after clicking on the module is the first option, which it's a True False button with the following dialog:
"Do you want to enable this module? To fully turn this off, both this option and the one below should be set to false."

Thanks.

2 Jun 2018, 4:45 AM
#379
muteyaar avatar

muteyaar

Zen Follower

Join Date:
Oct 2007
Posts:
134
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

Ryk:

For anyone else looking to do this, this answer was provided by the module author:

Now, having made it mandatory, the next requirement is to exclude it completely from the Store Pickup option! This would probably take a proficient php coder a matter of minutes...but I'm not, and I'm starting now! :D (So any suggestions are welcome!)

Thanks for the wonderful module to add shipping insurance.

I have two types of shipping options on my website:

  1. expedited shipping
  2. regular mail

Now, I need to add mandatory shipping insurance to the Regular mail shipping only. I do not want the shipping insurance to show with Expedited shipping option.

Kindly let me know how an this be made possible.

Thanks in advance.
muteyaar

28 Dec 2018, 10:21 PM
#380
arj3090 avatar

arj3090

New Zenner

Join Date:
Dec 2018
Location:
Orangeburg, SC
Posts:
7
Plugin Contributions:
0

Re: Optional Shipping Insurance Module [Support Thread]

chibipaw:

Alright, I've installed 3.3.0 into my dev environment and this is what I have discovered so far:

Once installed, this module does not appear to know it has been installed. So the +install will return to the admin menu, and edit of the module's configuration_value's is not possible without directly manipulating the database directly. With that said, the -remove button will not appear, uninstall is not possible without deleting the above keys from the table mentioned above. This is of course going to be problematic.I have this same problem. Did you find a solution?