Hi,
I'm working with the CA module and I need to use its hooks (hook_ca_trigger, hook_ca_condition and hook_ca_action).
The problem is that I can't find any proper documentation of these hooks and how to use them. I'm literally figuring them out by looking at other contributed modules' code, which leaves me with some open questions.
Generally, is there a good documentation somewhere that I can read?
Specifically, regarding hook_ca_action, how do I use the "#arguments" key? What sort of values do I put in? Where does "#entity" take its value from?
More specifically:
I'm creating my own module that needs to do some actions when certain stuff happens with the UC orders (status change etc.).
I want to be able to create a predicate, where the trigger is "order status gets updated", then I have some conditions, then I want the action to trigger a custom function of mine, and I want this function to get an argument with a specific string that I define.
So how can I create an action where the #callback is my function and the #arguments has my string?
Any insights will be greatly appreciated.
Comments
I'd appreciate any help
I'd appreciate any help anyone can give me...
Alon Peer
Web development
http://alonpeer.com
Did you find out anything useful?
Hi alonpeer,
I'm exactly in the same situation! Did you find out anything useful?
Regards,
Daniel.
Some documents i found
Hi,
Don know if you have already found the documentation, but just in case. These are the links which i know of,
http://www.ubercart.org/docs/developer/9034/conditional_actions
http://www.ubercart.org/docs/user/7657/configuring_conditional_actions
I would say not very complete, but contains good amount of documentation.
Hope this helps,
venkiparam
Is there an extra life jacket...
...because I am in the same boat. I am adding functionality to a company Intranet site that will allow users the ability to order internal products (promotional items) with manager approval - if the product requires.
I am in the process of creating a module named uc_approval (an Ubercart contribution) which will check to see if any of the products in the order requires approval from another user ("manager").
If so, the order status is changed to "in_approval" and the "manager" assigned to the user will have an item added to their Order Approval Queue (which also needs to be created). The "manager" will have to accept or decline the order. Once that happens, the order status will change to "approved" or whatever.
I am having trouble creating custom Conditional Actions. I understand how they work (from a high level)... thanks to these posts:
http://www.ubercart.org/docs/user/7657/configuring_conditional_actions
http://www.ubercart.org/docs/developer/9034/conditional_actions
but it would be nice if there was some sort of encompassing tutorial. I think hook_ca_entity() is what I need to start with...
uc_approval
Hi robdinardo,
This is the exact functionality I am looking for. Have you made any progress in developing this? Happy to be a tester for what you've done. Otherwise do you have any snippets?
Thanks and regards,
thinkingcap.
Encountering same challenge
I'm encountering the same challenge.
After payment is received
Set the order status to
fulfillment-processing
Then, send the order to the fulfillment company, via XML and web transactions
Then, set the order status appropriately to
fulfillment-error
completed
I'll follow your post and share whatever I learn. Please do the same.
I'm in the same boat. I need
I'm in the same boat. I need to understand conditional actions better for a module I'm writing: http://drupal.org/project/uc_file_s3, a module to allow selling Amazon S3 files in Ubercart. The documentation for Ubercart really needs to be improved on!
AGREED!
The documentation is cryptic at best. I saw one post where the author took someone's post on another thread and just pasted it into his documentation. TERRIBLE!