I've got a live site running Drupal 5 with Ubercart. I'm using a hacked version of discount which I've got working for most of what I want to do, but I need another kind of discount and the code is unbearable.
So I thought I'd just write a small module for practice (and dare I say it, for fun!), using hook_order or whatever hook is appropriate so that I can discount the order at checkout time.
I need to
(1) examine user status and products in cart to see if discount is applicable
(2a) apply discount by either adding a new negatively-priced item to the cart
-or-
(2b) add a line item to cart.
I'm happy enough to write the code, but the hooks docs for Ubercart 1.x dont seem up to date and there aren't many examples I can follow.
What would be really helpful is if someone would post some suggestions as to which Ubercarts hooks I should be considering, a description of when they are triggered and what is passed into them, and some samples I could examine. As I said, my first thought is that hook_order would be triggered when going to checkout but initial tests don't seem to indicate that, although it *is* triggered when looking at the list of orders.
Anyway, I'd really appreciate any pointers or links to stuff already out there that I missed!
Thanks!
