Closed (works as designed)
Project:
Ubercart
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 May 2010 at 16:09 UTC
Updated:
25 Mar 2011 at 02:15 UTC
the current module for uc_taxes does not apply any actions that are found in the Conditional Actions module.
Following the chain from uc_taxes_calculate I don't see anywhere in the chain anything that will actually apply any of the actions that may be put into the Conditionals Action for taxation. This means that any custom actions to change the tax rate is not done in any way.
While I could and probably will make a module that will use the hook_calculate_tax call, I would have liked the ability to use the Conditional Actions to the fullest.
Is there a road map or ETA on this integration?
Comments
Comment #1
graper commentedI was able to get the custom actions to work properly with very little added code and I hope that these changes can be implemented even if I have not provided a patch file.
First is to change line 448 of uc_taxes module to this
this sends the predicate and the arguments from the conditions to be applied along with the order and tax objects
inside uc_taxes.ca.inc
Change the function to accept the 2 new arguments
and add one line to apply the custom actions
that's all that's needed to get the actions to be applied from the conditional actions module.
sorry about not providing a patch file, just not enough time to get the svn downloaded and diff it out.
granville
Comment #2
longwaveThis is by design, only conditions make sense here really - running an action every time tax is calculated (or a shipping quote is retrieved, which uses the same code) doesn't make sense. If you need to alter something about the tax calculation itself, an alter hook would be more appropriate to add.