Need expert help updating Optional Insurance Mod for 1.3.8
OK, I had updated the Optional Insurance mod that had been hanging around. I got it working for 1.3.6 and 1.3.7 (and earlier), but since 1.3.8 came out, it is broken. I've tried a few things, and have done a lot of file comparing, but I can't figure out the issue. With this mod enabled, the Checkout Payment page is completely blank. There are no errors in the error log. Does an expert on what is new in 1.3.8 have any suggestions on what I should focus on?
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Jade - the only difference I can think of that could be affecting it is the security token that is now being used.
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Quote:
Originally Posted by
Kim
Jade - the only difference I can think of that could be affecting it is the security token that is now being used.
Hmmm, any tips on files to look to for adjustments? The optional insurance mod is loaded on Step 2 of checkout, and is in the modules/order_total/ folder. I've tried comparing 1.3.7 to 1.3.8 of other modules/order_total/ files but I can't find any differences that would help me fix the issue.
Re: Need expert help updating Optional Insurance Mod for 1.3.8
You have this section of code:
PHP Code:
if ($pass == 'true') {
$cart_content_type = $_SESSION['cart']->get_content_type();
$gv_content_only = $_SESSION['cart']->gv_only();
if ($cart_content_type == 'physical' or $cart_content_type == 'mixed') {
$charge_it = true;
} else {
// check to see if everything is virtual, if so - skip the low order fee.
if ((($cart_content_type == 'virtual') and MODULE_ORDER_TOTAL_LOWORDERFEE_VIRTUAL == 'true')) {
$charge_it = false;
if ((($gv_content_only > 0) and MODULE_ORDER_TOTAL_LOWORDERFEE_GV == 'false')) {
$charge_it = true;
}
}
if ((($gv_content_only > 0) and MODULE_ORDER_TOTAL_LOWORDERFEE_GV == 'true')) {
// check to see if everything is gift voucher, if so - skip the low order fee.
$charge_it = false;
if ((($cart_content_type == 'virtual') and MODULE_ORDER_TOTAL_LOWORDERFEE_VIRTUAL == 'false')) {
$charge_it = true;
}
}
}
//end else - $pass is still open
}
//end pass
NOTE: $charge_it is using true or false ...
However, everywhere else, $charge_it is using: 'true' and 'false' ...
Same with $usps ...
Not sure if there is an issue caused by this as I have not had time to test this module ...
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Quote:
Originally Posted by
Ajeh
You have this section of code:
PHP Code:
if ($pass == 'true') {
$cart_content_type = $_SESSION['cart']->get_content_type();
$gv_content_only = $_SESSION['cart']->gv_only();
if ($cart_content_type == 'physical' or $cart_content_type == 'mixed') {
$charge_it = true;
} else {
// check to see if everything is virtual, if so - skip the low order fee.
if ((($cart_content_type == 'virtual') and MODULE_ORDER_TOTAL_LOWORDERFEE_VIRTUAL == 'true')) {
$charge_it = false;
if ((($gv_content_only > 0) and MODULE_ORDER_TOTAL_LOWORDERFEE_GV == 'false')) {
$charge_it = true;
}
}
if ((($gv_content_only > 0) and MODULE_ORDER_TOTAL_LOWORDERFEE_GV == 'true')) {
// check to see if everything is gift voucher, if so - skip the low order fee.
$charge_it = false;
if ((($cart_content_type == 'virtual') and MODULE_ORDER_TOTAL_LOWORDERFEE_VIRTUAL == 'false')) {
$charge_it = true;
}
}
}
//end else - $pass is still open
}
//end pass
NOTE: $charge_it is using true or false ...
However, everywhere else, $charge_it is using:
true and false ...
Same with $usps ...
Not sure if there is an issue caused by this as I have not had time to test this module ...
Would that be a 1.3.8 ONLY issue though? And I'm not fully following what you mean.
Thanks!
Re: Need expert help updating Optional Insurance Mod for 1.3.8
I don't know the issues with your module ... I just noticed that you are interchanging true and 'true' and false with 'false' ...
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Jettrue, the problem is as described here:
http://www.zen-cart.com/forum/showpo...&postcount=212
For some reason (seems odd to me) this is a credit class and credit classes need a get_order_total() function in 1.3.8. You can start with the one in Quantity Discounts if you'd like or use one of the native modules (Group Discounts, etc.) for a template. But my suspicion is that you in fact do not want this to be a credit class.
Scott
Re: Need expert help updating Optional Insurance Mod for 1.3.8
This mod should actually be incorporated into Zencart future versions as many users send goods via the postal service and such and thus use insurance. I am constantly using it. This has now caused me yet another headache. Hope a fix is done soon Jettrue. Please post updates to this thread. I am subscribed to it now as I am sure others will be.:smartalec: Good luck!
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Quote:
Originally Posted by
swguy
Jettrue, the problem is as described here:
http://www.zen-cart.com/forum/showpo...&postcount=212
For some reason (seems odd to me) this is a credit class and credit classes need a get_order_total() function in 1.3.8. You can start with the one in Quantity Discounts if you'd like or use one of the native modules (Group Discounts, etc.) for a template. But my suspicion is that you in fact do not want this to be a credit class.
Scott
Thanks for the heads up Scott. I may not want it to be a credit class, but what a credit class even is is beyond me, so whether or not I want it to be one is moot. :P I simply updated this mod from some old mod someone else created. I am a php hacker, not a writer. But the above should help me hack it back together.
Ajeh, if you read my first post, you would have seen that the issue was that it worked in 1.3.7, but not in 1.3.8.
Re: Need expert help updating Optional Insurance Mod for 1.3.8
Quote:
Originally Posted by
jettrue
Thanks for the heads up Scott. I may not want it to be a credit class, but what a credit class even is is beyond me, so whether or not I want it to be one is moot
OK. Delete line 25 which says
$this->credit_class = 'true';
and retest.