This is something of an architectural / best-practices question. I want to programmatically set recurring order (not product) settings to a specific number of renewal cycles when an order is created, based on user selections elsewhere in the cart.
Specifically, I think I would like to customize some of the functions in the uc_recurring_order module such as this one: function uc_recurring_order_process_order, which has a line that hardcodes the default rebilling periods as infinite.
I can write the php and database code. My questions are: What is the best Drupalesque way to do so? In particular, what file(s) should I add or edit? What is the best architectural place to add processing of client-side inputs to the cart UI? I looked at the hooks in the API file with UC_recurring, but I don't see any that I can use.
I'm using Drupal 6.22 and UC_recurring 6.x-2.0-alpha6.
Thanks!

Comments

mattcasey’s picture

I would like to do something similar and would like to hear how you finally do this. You probably want to use one of Ubercart's hooks: http://www.ubercart.org/docs/developer/243/ubercart_hook_index

The recurring time seems to depend on $order->data['recurring_option']. You might be able to edit it with hook_add_to_cart()?