Lead Tracker for Ubercart 2.x

Contrib type: 
Module
Status: 
Initial upload
Moderation: 
Awaiting moderation

Downloads

Compatibility: 
Ubercart 2.x

I updated Ryan's Lead Tracker to work with Ubercart 2.x

http://www.ubercart.org/contrib/670

PreviewAttachmentSize
uc_lead.zip3.31 KB
Alethia's picture
Offline
Joined: 03/25/2009
Juice: 24
SQL Syntax Error

I am getting this error on install. I tried playing with the install SQL a bit, but I could not get around this error. I feel like its something small and I just can't see it.

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'unsigned NOT NULL DEFAULT 0, `order_id` unsigned NOT NULL DEFAULT 0, `lead_so' at line 2 query: CREATE TABLE uc_leads ( `lead_id` unsigned NOT NULL DEFAULT 0, `order_id` unsigned NOT NULL DEFAULT 0, `lead_source` VARCHAR NOT NULL DEFAULT 0, `lead_other` VARCHAR NOT NULL DEFAULT 0, PRIMARY KEY (lead_id), INDEX order_id (order_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /XXX/XXXX/public_html/XXXX/includes/database.inc on line 515.

My version of MySQL is 5.0.67-community.

Any thoughts on this?

Regards,

Shaun

Alethia's picture
Offline
Joined: 03/25/2009
Juice: 24
User Warning during checkout

Just to help anyone else, if you bypass the error when you install this. And you had an error, you will get this in your checkout.

    * user warning: Table 'XXXX_XXXX.uc_leads' doesn't exist query: UPDATE uc_leads SET lead_source = 'Please select one...', lead_other = '' WHERE order_id = 1 in /XXXXX/XXXXXX/public_html/XXXXX/modules/uc_lead/uc_lead.module on line 50.

Regards,

Shaun

m1k3ry4n's picture
Offline
Joined: 04/08/2009
Juice: 2
My Error Msg

I received the same error message:

user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'unsigned NOT NULL DEFAULT 0, `order_id` unsigned NOT NULL DEFAULT 0, `lead_so' at line 2 query: CREATE TABLE uc_leads ( `lead_id` unsigned NOT NULL DEFAULT 0, `order_id` unsigned NOT NULL DEFAULT 0, `lead_source` VARCHAR NOT NULL DEFAULT 0, `lead_other` VARCHAR NOT NULL DEFAULT 0, PRIMARY KEY (lead_id), INDEX order_id (order_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in S:\www\ubercart\includes\database.inc on line 515.

river_t@drupal.org's picture
Offline
Joined: 05/14/2009
Juice: 4
Updated to make it functional

The attached file is a slightly updated module to fix the schema problems (and some other issues) reported above. The uninstall method was also broken in the above module, so be sure you really have it uninstalled and the table removed before installing this version - it's not an update.

AttachmentSize
uc_lead.tar.gz 2.47 KB
Khalor's picture
Offline
Joined: 05/19/2009
Juice: 4
Error

Removed the previous (non-functional) lead tracker as best I could, installed the revised one, but error after install:

# user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NOT NULL DEFAULT 0, `lead_other` VARCHAR NOT NULL DEFAULT 0, PRIMARY KEY (lead' at line 4 query: CREATE TABLE uc_leads ( `lead_id` MEDIUMINT auto_increment DEFAULT NULL, `order_id` MEDIUMINT unsigned NOT NULL DEFAULT 0, `lead_source` VARCHAR NOT NULL DEFAULT 0, `lead_other` VARCHAR NOT NULL DEFAULT 0, PRIMARY KEY (lead_id), INDEX order_id (order_id) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /mounted-storage/home36c/sub003/sc28790-QQPM/XXXXXXXX/includes/database.inc on line 515.
# user warning: Table 'U9368294.uc_leads' doesn't exist query: SELECT * FROM uc_leads WHERE order_id = 9 in /mounted-storage/home36c/sub003/sc28790-QQPM/XXXXXXX/sites/all/modules/uc_lead/uc_lead.module on line 59
grungy's picture
Offline
Joined: 05/19/2009
Juice: 2
updated version

Khalor, try with my fix...

AttachmentSize
uc_lead_0_1.zip 4.41 KB
Khalor's picture
Offline
Joined: 05/19/2009
Juice: 4
works

Thanks grungy, that works great.

mkrapf's picture
Offline
Joined: 04/13/2009
Juice: 34
Adding an additional text field?

How difficult would it be to add additional text fields if the "other" option is selected?

To clarify, I would like to have three different text fields for options like name, phone, and birthdate if the "other" option is selected.

Any help would be greatly appreciated.

Thanks

firfin's picture
Offline
Joined: 05/17/2009
Juice: 76
Why is there theme stuff in .info

Hi,

I am using this module to build a new own checkout pane (so customers can set a date and time to pick up their order). And i was wondering what the following is doing in uc_lead.install :

/**

* @file

* The theme system, which controls the output of Drupal.

*

* The theme system allows for nearly all output of the Drupal system to be

* customized by user themes.

*/

I am sorry for this probably silly question. But this is the first time I've really started on the code of drupal.

--
Save a forest, kill a printer.

firfin's picture
Offline
Joined: 05/17/2009
Juice: 76
Problem with de-install

When i try to de-install the module I get these warnings:

* warning: Invalid argument supplied for foreach() in  {site}/includes common.inc on line 3283.
* warning: Invalid argument supplied for foreach() in {site}/includes/common.inc on line 3229.

I got this msg while trying to de-install my own module based on Lead-Tracker. After hours of head-scratching and trying to fix my 'cloned' module I realised the same error shows up when I de-install the original version 'Lead Tracker for Ubercart 2.x'

What can I do to help alleviate this problem?

--
Save a forest, kill a printer.

adamo's picture
Offline
Getting busy with the Ubercode.
Joined: 02/17/2009
Juice: 229
Referral Sources

I've posted a module in contrib called Referral Sources that provides similar functionality to Lead Tracker, but allows you to embed "Where did you hear about us?" type prompts anywhere in your site (registration, checkout, webforms, any other form) and track all submission data in a central location. It's written for D6/UC2.

See here: http://www.ubercart.org/contrib/11656

wpanssi's picture
Offline
Joined: 06/10/2009
Juice: 25
Modifying lead tracker

I try to modify uc_lead to fit my own purposes.
I try to edit uc_checkout_pane_lead -hook:

This is the original code:

<?php
$contents
['lead_source'] = array(
       
'#type' => 'select',
       
'#title' => t('I found your site through'),
       
'#options' => drupal_map_assoc($options),
       
'#default_value' => $arg1->lead['source'],
      );
?>

I want to change 'select' to 'checkboxes'.
After this change the form won't pass any values. With select you have one value, but with checkboxes you can have multiple values. However, I'm using just one option with the checkbox.

How could I make this work? I don't really know what happens when user proceeds from the check out page.

snicers's picture
Offline
Uber DonorInternationalizationizer
Joined: 09/20/2007
Juice: 192
Re: Modifying lead tracker

cool module, thank you! working like charm. suggestions: make the lead tracking choise mandatory

thuang's picture
Offline
Joined: 07/10/2010
Juice: 3
Thanks!

Just want I needed. Thanks Adamo! Smiling

Tanya

dimple's picture
Offline
Joined: 02/14/2011
Juice: 5
Extra field on checkout page

I want to add an extra field on checkout page ??

How to configure this lead tracker module.
I have installed uc_lead_0_1.zip but i can see any extra thing in ubercart configuration.

I need an help kindly help
Thanks in advance

dimple's picture
Offline
Joined: 02/14/2011
Juice: 5
Extra field on checkout page

I want to add extra taxonomy field on checkout page

Stoob's picture
Offline
Joined: 01/19/2011
Juice: 21
same thing happened to me

Install success. No options for new 'panes'. Nothing happens.

supersonic's picture
Offline
Joined: 08/05/2010
Juice: 11
error on checkout with lead tracker

I have installed the 6.x version of Lead Tracker and am getting the following error when I test the checkout as an authenticated user:

• user warning: Table 'mysite_drp1.drp_uc_leads' doesn't exist query: UPDATE drp_uc_leads SET lead_source = 'Facebook', lead_other = '' WHERE order_id = 419 in /mysite/public_html/sites/all/modules/contributed/uc_lead/uc_lead.module on line 50.
• user warning: Table 'mysite_drp1.drp_uc_leads' doesn't exist query: SELECT * FROM drp_uc_leads WHERE order_id = 419 in /mysite/public_html/sites/all/modules/contributed/uc_lead/uc_lead.module on line 59.

I can see the pane and have enabled it. Everything appears fine but I'm getting this error. Apparently the table(s) are not being created?

Can anyone help with this?

supersonic's picture
Offline
Joined: 08/05/2010
Juice: 11
#6 (grungy) finally worked

Thanks so much - grungy's version finally worked for me. This is really valuable for us!

The only problem, though, is that the "saved addresses" select list has disappeared from the checkout, i.e., so now even returning customers need to retype their address information into the form.

Anyone have a patch or a solution for this?

Thanks so much!

justclint's picture
Offline
Joined: 12/20/2009
Juice: 71
Works great, thanks! Just

Grungy's works great, thanks!

Just noticed though that the uninstall was not removing the uc_leads table.

the drupal_uninstall_schema('uc_leads'); just needs to be changed to drupal_uninstall_schema('uc_lead');

And the uninstall should now remove the table.

cjenkins's picture
Offline
Joined: 11/09/2011
Juice: 3
Ubercart 3.x

Anyone know if the lead tracker module is being updated for 3.x? Its seems like a great idea. I was going to just re-label the coupon code module and run it that way, but this would be certainly more efficient.