Contrib type:
ModuleStatus:
Moderator approvedCompatibility:
Ubercart Alpha 7eThis modules defines a checkout pane that lets customers specify how they heard about your site (and so functions as a very basic lead tracker). The pane is titled Customer Service Information and is turned on by default.
This is a demo module showing people a simple way to add a checkout pane, save and load the data collected to orders, and display the collected data on the order view screen. Presentation on the order screen is very basic, and there is currently no way to modify the data in this module.
When you install this module, you should go to the Checkout panes settings page and add lead options to appear during checkout.
Developer notes:
Use this module to see example implementations of the following hooks.
- hook_checkout_pane() - Defines a checkout pane to add the select box to the checkout form. The callback function uses the view, process, review, and settings values for $op.
- hook_order() - This handles saving and loading data added to the order object by the checkout pane to the database. It also serves to save and load the data on the order view screen.
- hook_order_pane() - Defines an order pane to display the customer's choice to administrators on the order view screen.
| Attachment | Size |
|---|---|
| uc_lead.tar.gz | 2.15 KB |


Removing textfield
What do you think about removing the "Other source" text field unless the user selects "other source"?
Re: Removing textfield
Aye, would be good... a simple touch of Javascript could handle it no doubt.
Re: Lead Tracker
Thanks for this Ryan. This is almost what I need. What would I have to do to get the user input appear on the admin/customer emails ? Are there any hooks to do that?
______________
Best regards,
Thomas Kulvik
Ny Media AS
www.nymedia.no
Re: Re: Lead Tracker
Hey kulvik, since the data gets saved/loaded with hook_order(), it's actually already going to be in the order object for use by your invoice templates. Dump out the array $order->lead to see the data.
How do I get it to work on Alpha7c?
For a variety of reasons (mostly for the coupon module and the fact that we cannot have more than a few minutes of downtime for upgrade), we would like something exactly like this that works on Alpha7c. I installed it, and the following happened:
"Customer Service" appears in the list of available checkout panes.
Settings for the lead tracker does not appear.
"Customer Service" pane does not appear in checkout...
...but it DOES appear in order review.
There is now a "Sales tracking" field in the order review screen.
We don't even need the drop-down menu... just a text field that indicates where the sale came from.
What modifications need to be done?
Re: How do I get it to work on Alpha7c?
To make this compatible for 7c, I'd just compare the code in the hook function and callback function with the code in your version of uc_cart.module and uc_cart_checkout_pane.inc. There aren't a lot of changes, and they should be recognizable.
Re: Re: How do I get it to work on Alpha7c?
Any chance of this bad boy being update to RC1?
I had taken it off a site I had it on but haven't reenabled it since it broke.