Reviewed & tested by the community
Project:
Ubercart Fee
Version:
6.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
10 Dec 2009 at 13:41 UTC
Updated:
17 Oct 2013 at 20:55 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Alex Lawrence commentedDoes no one else experience this problem? :(
Comment #2
klavs commentedI have a similar problem. I have VAT added for producs - but no VAT is applied to the fee I added. I'm guessing uc_fee needs to hook into uc_taxes somehow. or perhaps it's an order issue?
all hints as where to look appreciated. I'll try to fix myself and write more if I get anywhere.
Comment #3
klavs commentedDoh. I fixed my issue by going into VAT settings (under taxes - with uc_vat installed) - there I could choose to add VAT to fee as well - after installing the module and adding a fee.
Comment #4
mrfelton commentedComment #6
Maikel commentedI checked the setting as reference in post #3 but i am experiencing the same as the person in the first post. On the checkout page tax is applied correctly but when moving on to checkout/review the tax is gone.
However when i go back to checkout using the browsers 'previous' button (firefox) and going to checkout again, the tax is applied correctly!?
I haven't had the time to dive into this... but if i do i will post my experiences here. If anybody else has this problem, or was able to fix it, please post it here!
Comment #7
klavs commentedMaikel: I just noticed I have the same issue.
I think it's an uc_vat (or perhaps ubercart core) issue - I've opened an uc_vat case:
http://drupal.org/node/745854
Comment #8
dobe commentedI have experienced this problem as well. I have added the Fee to the line item that needs to be taxed at /admin/store/settings/taxes/%/edit . Everything calculates correctly on the checkout screen. However as soon as the user moves on to "Review" the order the fee is no longer taxed. If there is any ways to get this fixed ASAP that would be great as it is causing a site of mine to not be lived.
-Jesse
Comment #9
klavs commentedtry latest uc_vat dev version - longwave told me he implemented a workaround (saving the tax from the checkout page) - so whatever it shows wrongly on the order confirmation page - is not used when the order is saved.
I haven't tested it though.
Comment #10
Alex Lawrence commentedI should say that I did not use the uc_vat module on my site and still the fee was not taxed.
Comment #11
dobe commentedI believe he said to try using it.. As the uc_vat module has put some workaround code in... But that is not the issue here. the issue is with this module and I don't plan on utilizing uc_vat to fix the issue. Like #9 said its a workaround not a solution...
Comment #12
mrfelton commentedPlease try with this patch.
You also want to try the patch at #661684: Line items in Order total preview to give some sanity to the order in which the fees show on the checkout and review pages.
EDIT: Other patch has been committed, but I want testing on this one before I commit here.
Comment #13
dobe commentedI have applied this patch to the latest dev version. The line items appear to have been changed as those previous patches were suppose to do. However, when on the checkout page everything appears to be functioning correctly. Its when you review the order that the fee line item is not taxed even though it was calculating correctly on the checkout page. I do not believe #12 patch is a success.
Hopefully someone gets a different outcome?
Comment #14
mrfelton commented@dobe: Are you using the latest -dev of ubercart? If not, can you try with that please?
Comment #15
dobe commentedI upgraded from -dev that was released april 1st to the one that was released april 2nd and neither of them change the outcome :/
-Jesse
Comment #16
mrfelton commented@dobe: what ubercart related modules do you have installed?
Comment #17
mrfelton commentedPlease make sure you have the patch in #600892: Attribute Value Based Tax Rules Disappear Between Checkout and Review applied too.
Comment #18
Maikel commentedI was experiencing a similar problem so i did a clean install to test if this would fix my problem.
I installed latest dev. from ubercart (6.x-2.2) next i downloaded and installed uc_fee dev and applied the patch from #12. After that i applied the ca patch posted at #17. I created 2 products and a fee and applied taxes to both. And as noted before everything is fine on the checkout page, but when i visit the review page, the tax that should be applied is gone. So it seems the path does not change the result.
If more feedback is needed, or when i am doing something wrong? Let me know!
Comment #19
dobe commented#17's patch failed. That patch has to do with attribute based tax rules. As the issues we are receiving here have nothing to do with attributes. I have done the exact same thing #18 has done and the outcome is the same as #18.
Comment #20
Anonymous (not verified) commentedSame issue. Still not solved?
I noticed when you go "back" to the cart, and then re-submit, then the tax is added... So is it a session issue?
Comment #21
klavs commentedThis problem (and other problems as well) was solved by using this patch, written by me:
http://drupal.org/node/786594
Test it out and see if it works for you.
Appearently the ubercart devs feels otherwise - but it works for me, and I really disagree with them - but haven't gotten the time to debunk/solve his argument of security implications otherwere in the code being magicly solved by altering the order on load :) - also I know they've almost abandoned 2.x anyways - working on 3.x - and some gone to "drupal commerce" - so no reason for me to spend time on something that everyone else seems to have abandoned.
Comment #22
ziomizar commentedI think that the problem is that uc_taxes module don't get all the line item found in db.
I try to fix this problem adding this line :
$order = uc_order_load($order->order_id);
at the top (first line) of function
uc_taxes_apply_tax($order, $tax) {
in uc_taxes/uc_taxes.module
I'm testing this, in my local and dev distribution , but seem to work well.
----------------------------------------
Search Marketing Strategies - http://www.studiocappello.org
Comment #23
klavs commentedThat probably works well - because Ubercart (for some IMHO very invalid reason) UPDATES the total (ie. adds line_items such as tax) when you LOAD an item :(
I fixed it by fixing the function that adds line_items - so it updates the total as well.
See here: http://drupal.org/node/786594 - I have fee working just fine with uc_vat now.
Comment #24
ziomizar commentedMy patch work like a charm,
now i'm using my patch on my production site.
I've read your post, but i think that line_items work well in uc_order.
in fact fee module and other modules, adding line_items correctly in db with line_item api!! You can try and debug it easily.
uc_taxes read line_items value later when apply the tax in
uc_taxes_apply_tax($order, $tax)
line_items got by uc_taxes don't are in sync with the db in this function and have to reload the order.
My order total is ok(at the review page), also without this patch in uc_taxes_apply_tax function.
The only error that i get is in the taxable amount, that is managed by uc_taxes and no by uc_order module.
I have also open an issue here :
http://www.ubercart.org/project_issue/bug_uc_taxes_module_or_fees
----------------------------------------
Search Marketing Strategies - http://www.studiocappello.org
Comment #25
brutuscat commented#12 patch seems to fix this in my case. I was having issues in the review pane where the line items added by uc_fee didn't get taxed. With that patch, now they do.
Thanks!
Comment #26
arski commentedPatch in #12 fixes it for me too.
Unfortunately it doesn't fix previously stored orders - any chance of those getting fixed up as well? Or is it impossible to know which fees should have been applied to which taxes now that the orders are saved?
Switching to needs review again as most recent comments suggest it works. For those for whom it didn't work before - may I suggest you try again with latest versions of all three modules involved.
And it would be nice if someone with good understanding of UC workings reviewed it.. I personally don't dare switch the status to "rtbc".
@ziomizar: If you want your comments to be taken more seriously, try actually providing a real patch - that will help much more than reposting your comment in different places.
Cheers
Comment #27
ziomizar commentedComment #28
ziomizar commented@arski: i have posted my comment in other places, because i think that this is not the right place. I haven't try the patch at #12, but i have posted also my patch.
@arski: if you have all your stored orders with fees setted to "70", and the next year you will be set "100",
Do you want to set all your previously stored orders to "100"?
You should to mantain the orders info, with the info stored in the payment step.
This because if you change the price of a product(or fees) in the future, your profit is not right if you change all previously stored orders.
You have lost some informations(old price or fees) and the other informations are not correct(total order).
Comment #29
Anonymous (not verified) commented#12 works fine against ubercart-6.x-2.4.
please commit
Comment #30
dedek commentedAll solutiones above tested, but none of them not ideal for me (tried ubercart 2.6, 2.7, 2.x-dev). #22
is almost OK but on checkout pain disappears total amount including taxes and taxes itself, while on review pain is all right. Any idea? Thanks
Comment #31
SchwebDesign commentedComment #12 fixed this for me as well. I'm surprised this isn't committed yet?
Comment #32
bschnell commentedI tried patch #12 & 27 ubercart-6.x-2.4. In both cases I need to refresh the checkout pane before the proper fees and line items are taxed. Am I missing a step? I would love to get this functioning.
Comment #33
zoen commentedSame as #30 and #32, I find that with the suggested patches, the taxes now fail to show up on the checkout page, but do apply properly on the Review Order page and on order submit.
I noticed that when uc_taxes_apply_tax() is called on the checkout page, $order->order_id is 0, so no surprise calling uc_order_load() there doesn't work. So I wrapped the uc_order_load() call in a conditional, thus:
EDIT: No! I was wrong. Turned out the culprit in my case was in fact the Ubercart Discounts (Alternative) module. If any of you have this taxes-on-fees problem AND are also using uc_discounts_alt, clicky: https://drupal.org/node/2114635