If this is your first visit, check our documentation. To post, register or login.
Forums / All Other Contributions/Addons / How Did You Hear About Us? Referrals Mod [Support Thread]

How Did You Hear About Us? Referrals Mod [Support Thread]

Started by martyndw2005 on 14 May 2006, 10:09 PM · Views: 89,101

Results 101 to 120 of 365
18 Jul 2007, 4:43 AM
#101
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

How Did You Hear About Us? Referrals Mod [Support Thread]

UH OH!! You are WAY BAD for still being on 1.2.6 - you need to hack at your HEAD with that graphite shaft! giggle

Upgrading is not that bad.... just make sure you back up the site and database first - make sure your design files and modified files are all in a "custom" directory - and follow the instructions... you will do just fine! :flex:

gogolf:

Well know that I know I'm (cough) using version 1.2.6 WE know that the Referral mod won't work "easily". Thanks for the tips Stellar. It seems I have to either trade in my wood for a graphite shaft or hack away with 1.3.7.

29 Jul 2007, 3:42 PM
#102
tatiana77 avatar

tatiana77

Zen Follower

Join Date:
May 2007
Posts:
114
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Hello,

Fished around the forums and could not figure this out, and have noticed others with the same problem:

  1. On Admin>Customers page, there is a "referred by" title, but nothing is showing up for all the customers, just --none--... is this just a '1st Discount coupon' issue, because if it is, this ain't workin for me either.

  2. Admin>Extras>Referral Sources: Only item is "Other", and no matter what customer enters in the "How did you hear about us" field, the number will keep adding to this "Other" total, despite having several entries under Admin>Extras>Referrals

Here is my configuration:
Admin>Config>My Store>Display "Other" Referral option=true
Admin>Config>Customer Details>Require Referral=true
Admin>Config>Customer Details>Customers Referral Status=2
Admin>Extras>Referrals>AOL, Google, Magazine, Etc...
Admin>Extras>Referral Sources>Sources:'Other', Referred:4

-When I click on 'Other' it just says Displaying 0 to 0 (of 0 referral sources)" although I don't recall entering anything during test customer registration in the "Other" field, but my main issue is that there is no way to see totals of the "AOL, Google, Magazine etc" referrals.

Help??!!? :wacko:


30 Jul 2007, 1:34 PM
#103
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

I guess I have the same problem other users of the mod have run into:

I'm not seeing the referral posted when I view the Admin-Customer's screen, and the referral does not appear in the Reports-Customers Referral.

Inspecting my database in PHP I can see a field customers_referral in the customers table however there is nothing in the field for a record I created for a new customer.

Any suggestions?

31 Jul 2007, 1:53 AM
#104
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

A newbie trying to get this to work:

I was looking at my tables in the database and noted a message in MyPHP (server is running version 4.4.4) that stated
UNIQUE and INDEX keys should not both be set for column `configuration_key

Looks like the attached picture:

Does this indicate something that needs to be changed in the tables to make the mod work?

31 Jul 2007, 8:31 AM
#105
zilla avatar

zilla

New Zenner

Join Date:
Feb 2006
Location:
Bexhill, UK
Posts:
45
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

stellarweb:

I just did a clean install of the files that are currently in the downloads section to this site http://www.stellarsupplements.com/

I then copied and pasted the install_referrals.sql into the database in the admin section under tools/install sql patches... the code is pasted below.

The install went smoothly - and all worked well, with no changing of the files, so I am befuddled as to why you would have to change anything in the file in order to get it to work. I have installed this on several websites with the code intact, and it works fine on all of them.... BUT they were all on the same server with the same version of sql / php / etc running. Like you, I know enough sql to make me very dangerous :laugh: so wondering if the problem is different versions of sql or php??

DROP TABLE IF EXISTS sources;
CREATE TABLE sources (
sources_id int NOT NULL auto_increment,
sources_name varchar(64) NOT NULL,
PRIMARY KEY (sources_id),
KEY IDX_SOURCES_NAME (sources_name)
);

INSERT INTO sources VALUES (1, 'Google');
INSERT INTO sources VALUES (2, 'Yahoo!');
INSERT INTO sources VALUES (3, 'AOL');
INSERT INTO sources VALUES (4, 'MSN');
INSERT INTO sources VALUES (5, 'ZenCart');

DROP TABLE IF EXISTS sources_other;
CREATE TABLE sources_other (
customers_id int NOT NULL default '0',
sources_other_name varchar(64) NOT NULL,
PRIMARY KEY (customers_id)
);

ALTER TABLE customers_info ADD customers_info_source_id int NOT NULL AFTER customers_info_date_account_last_modified;

INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Display "Other" Referral option', 'DISPLAY_REFERRAL_OTHER', 'true', 'Display "Other - please specify" with text box in referral source in account creation', '1', '22', 'zen_cfg_select_option(array('true', 'false'), ', now());
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Require Referral', 'REFERRAL_REQUIRED', 'true', 'Require the Referral Source in account creation', '5', '6', 'zen_cfg_select_option(array('true', 'false'), ', now());

I've just installed using Stellarweb's code above... first to work for me! All seems well, apart from the fact that there is no mention of Referral within Admin... I know it'll be down to user error... but don't know where to begin, any ideas?

31 Jul 2007, 9:57 AM
#106
zilla avatar

zilla

New Zenner

Join Date:
Feb 2006
Location:
Bexhill, UK
Posts:
45
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

As I said... User error!!!
Re-uploaded all Admin files and all is now well!
You've gotta love thinking for yourself!

31 Jul 2007, 11:04 AM
#107
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

zilla:

As I said... User error!!!
Re-uploaded all Admin files and all is now well!
You've gotta love thinking for yourself!

Tried that.
Nothing appears below the Admin-Customers "TABLE_HEADING_REFERRED_BY"
after creating a new customer.

And, after the new customer placed an order I'm getting the following error
when trying to view the order through Admin-Customers-Orders:
Fatal error: Cannot redeclare class order in ........./admin/includes/classes/order.php on line 23

31 Jul 2007, 12:59 PM
#108
zilla avatar

zilla

New Zenner

Join Date:
Feb 2006
Location:
Bexhill, UK
Posts:
45
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

have you double checked that you've uploaded all the files to all the right places? Are you using the same SQL that I did because the one supplied with the mod didn't work for me.

31 Jul 2007, 1:56 PM
#109
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

zilla:

have you double checked that you've uploaded all the files to all the right places? Are you using the same SQL that I did because the one supplied with the mod didn't work for me.

I have tried several variations of the SQL mod regarding the "true" statements,
the "/" as well as the ',' issues. Evertime I run the SQL mod the message is the same as everyone else got ... the tables were already updated and can't do it again, unless that means that some of the SQL patch did not take place.

I'm using:
v1.3.7.1 [2007-07-11 19:10:46] (Fresh Installation)
Server OS: Linux 2.6.9-34.ELsmp
PHP Version: 4.4.4 (Zend: 1.3.0)
Database: MySQL 4.1.21-standard
PHP Version 4.4.4

Getting this mod to work for me is very important, you get to know where your customers are coming from. If there is another way to capture the same information other than this mod I'd give that a shot too.

8 Aug 2007, 3:41 AM
#110
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Update on trying to get the mod to work (refer to previous posts).
Last night deleted the new store and reinstalled it.
Installed the mod per its instructions.
Went into mysql
Went into myphpadm
Cut and pasted the sql patch and ran it.
Got the following error:
SQL query:

ALTER TABLE customers_info ADD customers_info_source_id int NOT NULL AFTER customers_info_date_account_last_modified;

MySQL said: Documentation
#1060 - Duplicate column name 'customers_info_source_id'

Does this mean the table was already there and it should not have been?
Or, does this mean there is a problem with the install_referrals.sql ?

Again I have the same problem as before, if a new customer signs up to the store the referral does not appear under under TABLE_HEADING_REFERRED_BY when viewed from Admin/Customers, and nothing shows up when you run a referrals reports.

And if I look at the field in the database for the new customer, though all the other customer data is there, there is nothing in the referral... blank, zip, nada.

It seems like the referral is not being posted to the table or its field.

8 Aug 2007, 1:02 PM
#111
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Another what will appear to be a long thread of updates from this newbie trying to figure out why the customer's referral is not appearing in the Admin/Customers or the Admin/Reports/Customers Referral Report.

I went into the database table for customers_info and looked at the field name
customers_info_source_id and saw that for the five test customers I setup each had a value of "0".

I then edited four of the five test customers to have a value other than 0, such as "1". I then went back to the admin/customers and saw that the four customers now had a referral appearing (finally) under the TABLE_HEADING_REFERRED_BY and the one customer I did not edit had "none" which appears to be what "0" will do.

When I ran the Admin/Reports/Customer's Referral the report showed nothing.
However when I explored Admin/Extra's/Referral Sources what appeared was a count of each of the referral names. So at least now I know that the database will report something on the admin side but for some reason the referral is not being posted in the database when the customer account is created.

10 Aug 2007, 4:16 PM
#112
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

We are having the same exact problem. The database is not storing the referral information when creating test customers... but if I go into the database and manually change the values, then the associated referral sources show up in the admin reports.

So, as far as I can tell, the main problem here is - why is the database not getting passed the referral info in the create_account page? HELP - if anyone knows how to troubleshoot this, it'll solve both mine and gogolf's problems.

In case anyone can eyeball this code and see what the problem is, I believe the problem lies somewhere in this code from tpl_module_create_account.php

<!-- //rmh referral start -->
 <fieldset>
<legend><?php echo TABLE_HEADING_REFERRAL_DETAILS; ?></legend>
<!--<?php echo zen_draw_separator('pixel_trans.gif', '100%', '10'); ?> -->
<!-- <?php echo CATEGORY_SOURCE; ?> -->
<?php echo zen_get_source_list('sources', (DISPLAY_REFERRAL_OTHER == 'true' ? true : false)) . ' ' . (zen_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); ?><?php echo ENTRY_SOURCE; ?>
<br class="clearBoth" />

<?php
 if (DISPLAY_REFERRAL_OTHER == 'true') {
?>
<?php echo zen_draw_input_field('source_other', '', 'id="sources_other_name" size="26"') .  (zen_not_null(ENTRY_SOURCE_OTHER_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_OTHER_TEXT . '</span>': ''); ?> <?php echo ENTRY_SOURCE_OTHER; ?>
<br class="clearBoth" />
</fieldset>
<?php
}
?>
<!-- //rmh referral end -->
```All the other fields on tpl_module_create_account.php pass info to the Customers table while this data is supposed to be stored in Customers_Info.  Could this be the problem?

BTW, AFAICT, Admin/Reports/Customer's Referral is for a totally different report unrelated to this mod.
10 Aug 2007, 5:16 PM
#113
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

I dug into the Module code for this, and wondering if the problem is here. Note, my customers_info table is receiving the other data (ID, 0, Now) but not the source ( (int)$source ).

values ('" . (int)$_SESSION['customer_id'] . "', '0', now(), '" . (int)$source . "')";
```**From the mod:**
```php
//rmh referral start
      $query_insert= "insert into " . TABLE_CUSTOMERS_INFO . "
      (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) 
      values ('" . (int)$_SESSION['customer_id'] . "', '0', now(), '" . (int)$source . "')";

      $db->Execute($query_insert);

    $db->Execute($sql);
      if ($source == '9999') {
        zen_db_perform(TABLE_SOURCES_OTHER, array('customers_id' => $_SESSION['customer_id'], 'sources_other_name' => $source_other));
      }
//      $sql = "insert into " . TABLE_CUSTOMERS_INFO . "
//                          (customers_info_id, customers_info_number_of_logons,
//                           customers_info_date_account_created)
//              values ('" . (int)$_SESSION['customer_id'] . "', '0', now())";
//
//      $db->Execute($sql);
//rmh referral end
10 Aug 2007, 11:03 PM
#114
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

MyGreyGoose,

Yeah. I'm starting to wonder where the problem is with this great mod. And its a shame not to solve the riddle because tracking where your customers come from is common sense. I'm super- prized that this mod was not in 1.3.7 !

What is most puzzling is that there seems to be an array of users here who all have the same problem yet some have solved it with different approaches.
....... yet I'll have to assume some have probably quit too early and gave up.

So where are the experts when we need them?

I think its worth a cup of coffee!

11 Aug 2007, 3:06 AM
#115
stellarweb avatar

stellarweb

Zen Follower

Join Date:
May 2006
Location:
Montana
Posts:
293
Plugin Contributions:
8

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Just as an FYI - after a PM from MyGreyGoose this afternoon .... I did an install of this mod onto a working 1.3.7 zencart.... and the results were again the same as when I have installed it on other websites for my clients - works perfectly.

I created a new account after installing the mod.... used google as the referral source and the report under Extras > Referral Sources now shows:
Referral Sources
Sources Referred
Google 1
Other 9

(the ones in the "other column" are existing customer accounts - it automatically throws them there)

Again... all I did was take the files from the zip file..... put them all in the corresponding directories.... went into my zencart admin and copied and pasted the install_referrals.sql info under tools.... install sql patches..... and everything works peachy keen. :blink:

A couple of things that MAY help to double check yourself on ......

  1. Make sure you install the patch via your zencart admin
  2. Make sure that the file under the Templates folder is put into your specific CUSTOM directory folder... per the installation instructions (\includes\templates*YOUR-TEMPLATE*\templates\tpl_modules_create_account.php)
  3. Remember that the definition of insanity is... "doing the same thing over and over again and expecting different results!" :smile:

I know that probably doesnt help.... but I just wanted to put in my $.05 cents worth (inflation.....) :)

gogolf:

MyGreyGoose,

Yeah. I'm starting to wonder where the problem is with this great mod. And its a shame not to solve the riddle because tracking where your customers come from is common sense. I'm super- prized that this mod was not in 1.3.7 !

What is most puzzling is that there seems to be an array of users here who all have the same problem yet some have solved it with different approaches.
....... yet I'll have to assume some have probably quit too early and gave up.

So where are the experts when we need them?

I think its worth a cup of coffee!

11 Aug 2007, 4:06 AM
#116
tatiana77 avatar

tatiana77

Zen Follower

Join Date:
May 2007
Posts:
114
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Hello again,
I'm getting worried as I'll be going live very soon and the referrals helps me pay out a commission to my sales rep as well as bonuses for magazine referrals...

I've merged the files, reinstalled them, rechecked.....etc. At this point can someone take a look at my orders, customers, create account files if you have a couple minutes. I've merged them but something tells me it might lie within another mod conflict. Out of all the mods I've used, this one has got me stumped

TIA,
Tatiana


11 Aug 2007, 1:09 PM
#117
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Judy,

I guess I can now qualify for the Insanity Award because I've read all your comments several times, tried all the suggestions posted in this thread several times. Now I want to go for the Neurotic Award because its all grey to me know

My store is a fresh install. The only mods are creating a custom template, yes I tried putting all the files mentioned its directory, and I added the Ask A Question About This Product mod.

A few questions for you:

  1. Do KNOW if the Ask a Question About This Product mod is the problem?

  2. Have you ever had a problem with the Referral mod?

  3. What are the specific scripts or php's that direct the referral into the tables field (what is the path or flow)?

I look forward to you help.

12 Aug 2007, 3:39 AM
#118
gogolf avatar

gogolf

New Zenner

Join Date:
Mar 2006
Posts:
57
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

And just to make sure I'm insane I installed another new Zen Cart, followed the instructions and got following error running the SQL patch:

1064,,,,, yada yada yada,. (you know the rest).

So. Did some say they have a cast call for a remake of One Flew Over the CucKoo's Nest?

And HERES Johnny!

12 Aug 2007, 3:44 AM
#119
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

gogolf:

And just to make sure I'm insane I installed another new Zen Cart, followed the instructions and got following error running the SQL patch:

1064,,,,, yada yada yada,. (you know the rest).Did you copy-and-paste the SQL contents into the SQL Patch window, or did you Browse to the file and click Send?
Sometimes the copy/paste works better.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

13 Aug 2007, 12:21 PM
#120
mygreygoose avatar

mygreygoose

New Zenner

Join Date:
Jun 2007
Posts:
91
Plugin Contributions:
0

Re: How Did You Hear About Us? Referrals Mod [Support Thread]

Hi Dr. Byte,

Thanks for your help on this. Gogolf and I have been in touch and are having the same problem, although he can answer your q specifically. I think Tatiana is having the same prob.

For me, when I first did the sql patch, I tried uploading it. I got an error. I investigated, and all the first statements seemed to take hold. Not the last two (related to the configuration table). I copied and pasted those in. AFAICT, the table modifications and row inserts took hold as desired.

To me, it seems like everything in the mod was set up correctly, it looks great in my shop, but that when you click submit to create an account, everything gets submitted to the tables EXCEPT for the customers_info_source_id. I wonder if it has anything to do with the fact that all the other fields on create_account go into the customers table instead of customers_info.

I tried pinpointing the problem. I substituted an integer for the code that produces the customers_info_source_id value, but that did not go into customers_info either. So, I wonder if it's even deeper in the code?