Guest Posted January 18, 2004 Share Posted January 18, 2004 Hi, I'm sure this has probably been discussed before, but I'll be darned if I can find anything on it in searching the forum... I need to set the calculations up so that the shipping charge is added to the sub-total, and taxes are then calculated on the subtotal, which includes taxes on the shipping charge. As it is now, taxes are not charged on shipping. Could somebody let me know how to do this or point me in the right direction if the answer is already out there somewhere? Thanks! Link to comment Share on other sites More sharing options...
JaaMor Posted January 19, 2004 Share Posted January 19, 2004 You will want to change your sort order in your admin. Make sure taxes have a larger number than shipping and it should work. We will not regret what we have done. We will regret what we didn't do. Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2004 Share Posted January 19, 2004 Right, that's what I thought too, but that did not work. All that does is change the way the items are listed, but still does not include the shipping in the tax calculation. The sort order I have is: Shipping 1 Sub-Total 2 Tax 3 Total 4 No luck with that...the shipping charge is still not even included in the Sub-Total...any other ideas? Thanks! Link to comment Share on other sites More sharing options...
dman3021 Posted January 28, 2004 Share Posted January 28, 2004 No luck with that...the shipping charge is still not even included in the Sub-Total...any other ideas? Yea, I have the same problem, the total contains the shipping tax, but to someone who does not know this it looks like the site is ripping them off of some money. This is what the customer sees: Shipping Regular: CAD $10.00 Sub-Total: CAD $97.99 GST ( 7% ): CAD $6.86 PST ( 8% ): CAD $7.84 Total: CAD $124.19 Now the item price is 97.99, so the sub-total does not contain the shipping charge. and the 6.86 and 7.84 do not contain the shipping tax, yet the total of the order contains 1.50$ extra -> the shipping taxe. Any help at all would be very appreciated. Link to comment Share on other sites More sharing options...
dman3021 Posted January 28, 2004 Share Posted January 28, 2004 Well, I found a way to hack OsCommerce to give the desired results. Modifications must be done on the order.php found in the catalog/includes/classes/. Modify the following lines (located at the end of the file: if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal'] + $this->info['shipping_cost']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax'] + $this->info['shipping_cost']; } to if (DISPLAY_PRICE_WITH_TAX == 'true') { $this->info['total'] = $this->info['subtotal']; } else { $this->info['total'] = $this->info['subtotal'] + $this->info['tax']; } The goal is to remove the addition of shipping at the end of the order. Next, you simply have to find the following line of code: for ($i=0, $n=sizeof($products); $i<$n; $i++) { and add this code before:$this->info['subtotal'] += $shipping['cost']; This will add the cost of shipping to your subtotal, and then the taxes will be calculated on the subtotal to give a total with taxes! I suggest you put this page in the following order, for customers sake. Shipping 1Sub-Total 2 Tax 3 Total 4 Be sure to also remove any taxes you have added to your shipping using the admin pages. If you don't, you will charge taxes on shipping twice. Hope this helps, :D Dan... Link to comment Share on other sites More sharing options...
liquid57 Posted February 24, 2004 Share Posted February 24, 2004 my problem was that my shipping charge was being taxed and my product was not; when the client wanted it the other way around, i started to panic a little, thinking there was going to be a need for code surgery. for possible future reference to myself and anyone else, there are two things to be aware of: 1) make sure to select the proper 'tax class' for your product in the catalog and 2) double check that tax class is set to 'none' in the shipping module (with flat rate shipping). using the info posted above for display order, i now have the proper figures. Link to comment Share on other sites More sharing options...
Chuckler Posted February 13, 2005 Share Posted February 13, 2005 I'm having a prob with the way OSC calculates the shipping tax. eg. Item 1 ... $452.60 Shipping .$ 9.90 Subtotal . $461.60 Tax.........$ 42.05 Total.......$462.50 In this example, Item 1 is $452.60 including 10% tax. Shipping is $9.90 including 10% tax. The subtotal should be $462.50, and the Tax should be $42.95. I've already applied dman_3021's fix from this thread. Any help? Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.