Jump to content



Photo
* * * * * 2 votes

USPS Shipping Insurance


  • Please log in to reply
112 replies to this topic

#21   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 15 March 2008 - 01:38

Scott:

Now you have me puzzled. What do you mean when you say "does not work like it should"? What doesn't wok?

Dennis


It works for only 1 package per order, more than 1 package per order and it won't calculate properly because I don't know how to get the order_totals module to import the $shipping_num_boxes variable from includes/classes/shipping.php - also, I'd rather have it on the checkout_shipping.php page, but I can't figure out how to carry the variable through checkout_payment.php to checkout_confirmation.php

Also, several people have reported tax issues, but I have not verified this personally.

thanks!

Scott

Edited by olsonsp4c, 15 March 2008 - 01:40.


#22   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 15 March 2008 - 02:35

I understand.

It works well for me as I only ship one package at a time and the tax calculation is working properly for me. I saw references to that but I am not required to collect tax for the shipping cost so it's just fine as is. In addition, it's very accurate. If you have the tare weight correct and the weight of the merchandise correct the shipping charges with insurance are 100% on the nose.

Thanks again!

#23   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 16 March 2008 - 00:26

A major problem after receiving the first few orders paid by PayPal. The insurance charge is NOT added to the PayPal payment. So the order invoice shows they wanted insurance but they don't pay for it when using PayPal. What to do now?

#24   kimm

kimm
  • Members
  • 30 posts
  • Real Name:Kim Hibma

Posted 16 March 2008 - 03:53

Hey Scott,

I think I may have found the reason that tax is not cal
culated on the shipping insurance. I have CCGV(trad) loaded and I found the following code in checkout_confirmation:
$payment_modules->update_status();

$order_total_modules = new order_total;// CCGV
$order_total_modules->collect_posts();// CCGV
$order_total_modules->pre_confirmation_check();// CCGV

// Line edited for CCGV
// if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}

if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}

// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
$_SESSION['choose_insurance'] = $_POST[choose_insurance]; //USPS shipping insurance
//Lines below repositioned for CCGV
// require(DIR_WS_CLASSES . 'order_total.php');
// $order_total_modules = new order_total;


It appears that the repositioned lines keep the shipping insurance from getting added into the order total. Any suggestions on how to fix this? I am a php dummy.

TIA
Kim

#25   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 16 March 2008 - 04:43

(Adding information for my PayPal problem posting above.)

The variable for insurance needs to be added to the /ext/ipn.php as it is for shipping below in ipn.php. Or, shipping and insurance could be added together on the order_confirmation page and then the variable "shipping" would be fine.
Would someone write the code for either of those?
[Sat Mar 15 17:13:10 2008] [error] PP TEST received POST variable: shipping : 1.98

#26   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 16 March 2008 - 05:31

Hey Scott,

I think I may have found the reason that tax is not cal
culated on the shipping insurance. I have CCGV(trad) loaded and I found the following code in checkout_confirmation:
$payment_modules->update_status();

$order_total_modules = new order_total;// CCGV
$order_total_modules->collect_posts();// CCGV
$order_total_modules->pre_confirmation_check();// CCGV

// Line edited for CCGV
// if ( ( is_array($payment_modules->modules) && (sizeof($payment_modules->modules) > 1) && !is_object($$payment) ) || (is_object($$payment) && ($$payment->enabled == false)) ) {
if ( (is_array($payment_modules->modules)) && (sizeof($payment_modules->modules) > 1) && (!is_object($$payment)) && (!$credit_covers) ) {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode(ERROR_NO_PAYMENT_MODULE_SELECTED), 'SSL'));
}

if (is_array($payment_modules->modules)) {
$payment_modules->pre_confirmation_check();
}

// load the selected shipping module
require(DIR_WS_CLASSES . 'shipping.php');
$shipping_modules = new shipping($shipping);
$_SESSION['choose_insurance'] = $_POST[choose_insurance]; //USPS shipping insurance
//Lines below repositioned for CCGV
// require(DIR_WS_CLASSES . 'order_total.php');
// $order_total_modules = new order_total;


It appears that the repositioned lines keep the shipping insurance from getting added into the order total. Any suggestions on how to fix this? I am a php dummy.

TIA
Kim


Kim,

try reposition the shipping lines to right before: $order_total_modules = new order_total;// CCGV

let me know what happens...

Scott

#27   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 16 March 2008 - 05:39

(Adding information for my PayPal problem posting above.)

The variable for insurance needs to be added to the /ext/ipn.php as it is for shipping below in ipn.php. Or, shipping and insurance could be added together on the order_confirmation page and then the variable "shipping" would be fine.
Would someone write the code for either of those?
[Sat Mar 15 17:13:10 2008] [error] PP TEST received POST variable: shipping : 1.98


some paypal modules need the following fix... if you install this contribution and the shipping insurance is not included in your paypal totals, TRY making the changes outlined below.

You will need to MOVE the lines that you are instructed to insert into checkout_process.php so that the following three lines (not counting blanks):

require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

are just ABOVE the added part instead of below it and these 2 lines:

// load the before_process function from the payment modules
$payment_modules->before_process();

are JUST BELOW it

SO IT LOOKS LIKE THIS:
========================================
require(DIR_WS_CLASSES . 'order.php');
$order = new order;
require(DIR_WS_CLASSES . 'order_total.php');
$order_total_modules = new order_total;

$order_totals = $order_total_modules->process();

Try this and let me know if it helps...

Scott

#28   Dennisra

Dennisra
  • Members
  • 515 posts
  • Real Name:Joseph D. Jefferson
  • Gender:Male

Posted 16 March 2008 - 06:28

Hi Scott:

Wow! Thanks for getting back so quickly.

I am certain that is the way my PayPal module is already set up. I have posted the code below:
// load selected payment module
	 require(DIR_WS_CLASSES . 'payment.php');
	 $payment_modules = new payment($payment);
   
   // load the selected shipping module
	 require(DIR_WS_CLASSES . 'shipping.php');
	 $shipping_modules = new shipping($shipping);
   
	 require(DIR_WS_CLASSES . 'order.php');
	 $order = new order;
   
   //Shifted this way down to transport shopping points to paypal
   // load the before_process function from the payment modules
   //  $payment_modules->before_process();
   
	 require(DIR_WS_CLASSES . 'order_total.php');
	 $order_total_modules = new order_total;
   
	 $order_totals = $order_total_modules->process();
   
   // load the before_process function from the payment modules
	 $payment_modules->before_process();
   
	 $sql_data_array = array('customers_id' => $customer_id,
							 'customers_name' => $order->customer['firstname'] . ' ' . $order->customer['lastname'],
							 'customers_company' => $order->customer['company'],
							 'customers_street_address' => $order->customer['street_address'],
							 'customers_suburb' => $order->customer


#29   kimm

kimm
  • Members
  • 30 posts
  • Real Name:Kim Hibma

Posted 16 March 2008 - 18:46

Kim,

try reposition the shipping lines to right before: $order_total_modules = new order_total;// CCGV

let me know what happens...

Scott


I guess that wasn't the problem. Made the change and still not sales tax calculated on shipping insurance. There is no place on the admin side when setting up the insurance to identify what tax class to use. Should there be? Maybe I did something wrong during the install.

#30   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 16 March 2008 - 20:31

I guess that wasn't the problem. Made the change and still not sales tax calculated on shipping insurance. There is no place on the admin side when setting up the insurance to identify what tax class to use. Should there be? Maybe I did something wrong during the install.


OK, change the code back to the way it was - let me check into your question and get back with you /smile.gif' class='bbc_emoticon' alt=':)' />

Scott

#31   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 03:49

I guess that wasn't the problem. Made the change and still not sales tax calculated on shipping insurance. There is no place on the admin side when setting up the insurance to identify what tax class to use. Should there be? Maybe I did something wrong during the install.


That is the issue Kimm... this is the adjustment - i will update it in the next release - sorry about that:

1. Remove the order total module
2. Open includes/modules/order_total/ot_uspsinsurance.php

FIND this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Insure Tax', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'True', 'Insure tax on packages shipped by USPS?', '6', '2', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

AFTER add this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

3. Re-install
4. Make the sort order appropriate and choose options

it should work /smile.gif' class='bbc_emoticon' alt=':)' />

Scott

#32   kimm

kimm
  • Members
  • 30 posts
  • Real Name:Kim Hibma

Posted 17 March 2008 - 05:29

That is the issue Kimm... this is the adjustment - i will update it in the next release - sorry about that:

1. Remove the order total module
2. Open includes/modules/order_total/ot_uspsinsurance.php

FIND this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Insure Tax', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'True', 'Insure tax on packages shipped by USPS?', '6', '2', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");

AFTER add this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

3. Re-install
4. Make the sort order appropriate and choose options

it should work /smile.gif' class='bbc_emoticon' alt=':)' />

Scott

Ok I made the change in the file and can see the changed in the database but I don't get a drop down box in admin for the tax class.

#33   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 06:25

Ok I made the change in the file and can see the changed in the database but I don't get a drop down box in admin for the tax class.


oops, i forgot another...

1. Remove the module
2. make these changes


FIND this:

return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

REPLACE with this:

return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSFLAT_TAX_CLASS', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

FIND this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

REPLACE with this:
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

3. Re-install and choose options...

Hopefully it works! I made these changes on my test store and got the dropdown box... let me know!

/smile.gif' class='bbc_emoticon' alt=':)' />

Scott

Edited by olsonsp4c, 17 March 2008 - 06:31.


#34   kimm

kimm
  • Members
  • 30 posts
  • Real Name:Kim Hibma

Posted 17 March 2008 - 07:29

oops, i forgot another...

1. Remove the module
2. make these changes
FIND this:

return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

REPLACE with this:

return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSFLAT_TAX_CLASS', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

FIND this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

REPLACE with this:
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

3. Re-install and choose options...

Hopefully it works! I made these changes on my test store and got the dropdown box... let me know!

/smile.gif' class='bbc_emoticon' alt=':)' />

Scott

Ok now I get a space in admin where I assume the new drop down should be but there is nothing in that area.

#35   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 07:36

Ok now I get a space in admin where I assume the new drop down should be but there is nothing in that area.


Kimm,

I'm making mistakes... i apologize, it's late here in Portland.

the changes should have read this:

FIND this:


return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

REPLACE with this:


return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

FIND this:


tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

REPLACE with this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");


for you at this point it just means changing MODULE_OT_USPSFLAT_TAX_CLASS to MODULE_OT_USPSINSURANCE_TAX_CLASS in the 1st REPLACE

Scott

Edited by olsonsp4c, 17 March 2008 - 07:39.


#36   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 07:47

Joseph,

You are correct. Could you let me know which Paypal Module and version you are using?

One quick suggestion is to try making the same edit you made in checkout_confirmation.php to your Paypal file.

Scott

Edited by olsonsp4c, 17 March 2008 - 07:52.


#37   kimm

kimm
  • Members
  • 30 posts
  • Real Name:Kim Hibma

Posted 17 March 2008 - 07:58

Kimm,

I'm making mistakes... i apologize, it's late here in Portland.

the changes should have read this:

FIND this:

return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

REPLACE with this:
return array('MODULE_OT_USPSINSURANCE_STATUS', 'MODULE_OT_USPSINSURANCE_INSURE_TAX', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', 'MODULE_OT_USPSINSURANCE_CHOICE', 'MODULE_OT_USPSINSURANCE_SORT_ORDER', 'MODULE_OT_USPS_INS1', 'MODULE_OT_USPS_INS2', 'MODULE_OT_USPS_INS3','MODULE_OT_USPS_INS4', 'MODULE_OT_USPS_INS5', 'MODULE_OT_USPS_INS6', 'MODULE_OT_USPS_INS7', 'MODULE_OT_USPS_INS8', 'MODULE_OT_USPS_INS9', 'MODULE_OT_USPS_INS10');

FIND this:
tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_SHIPPING_USPSFLAT_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");

REPLACE with this:

tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Tax Class', 'MODULE_OT_USPSINSURANCE_TAX_CLASS', '0', 'Use the following tax class on the shipping fee.', '6', '0', 'tep_get_tax_class_title', 'tep_cfg_pull_down_tax_classes(', now())");
for you at this point it just means changing MODULE_OT_USPSFLAT_TAX_CLASS to MODULE_OT_USPSINSURANCE_TAX_CLASS in the 1st REPLACE

Scott

I see you're a fellow night owl, its almost 3am here. I made the change and now get the drop down for tax class, however still no sales tax in the shipping calculation. I tried it with both versions of the checkout_confirmation mod.

#38   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 08:08

I see you're a fellow night owl, its almost 3am here. I made the change and now get the drop down for tax class, however still no sales tax in the shipping calculation. I tried it with both versions of the checkout_confirmation mod.


Did you update the sort order so that shipping insurance is numbered 1 higher than tax?

could you clarify on the "both" versions of the checkout_confirmation.php file? I have not updated anything in this file (just the 1 edit - 1 added line)...

Scott

#39   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 08:10

I just issued version 1.1 of this contribution:

Changes since v1.0
------------------
* Corrected the colspan to "3" instead of "4" in the second half of checkout_payment.php
* Corrected the table alignment issues in checkout_payment.php
* Added BEGIN and END comments to the stylesheet
* Added the missing Tax Class database entry and corresponding code edits
* Added update instructions

http://addons.oscommerce.com/info/5782

Scott

#40   olsonsp4c

olsonsp4c
  • Members
  • 548 posts
  • Real Name:Scott Olson
  • Gender:Male
  • Location:Colorado Springs, CO

Posted 17 March 2008 - 08:37

I see you're a fellow night owl, its almost 3am here. I made the change and now get the drop down for tax class, however still no sales tax in the shipping calculation. I tried it with both versions of the checkout_confirmation mod.


A few more edits and let me know what happens:

FIND this:

$this->enabled = MODULE_OT_USPSINSURANCE_STATUS;

ADD this AFTER:

$this->tax_class = MODULE_OT_USPSINSURANCE_TAX_CLASS;

FIND this:

$this->output[] = array('title' => $this->title . ':',
								'text' => $currencies->format($insurance, true, $order->info['currency'], $order->info['currency_value']),
								'value' => ($insurance * $shipping_num_boxes));

ADD this AFTER:

if ($this->tax_class > 0) {
		  $this->output['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
		}

Let me know... i'm off to bed, hope this works...

Scott

Edited by olsonsp4c, 17 March 2008 - 08:40.