Zen Cart Logo
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]

Views: 88,383

Results 201 to 220 of 365
15 Jan 2008, 7:32 PM
#201
wigum avatar

wigum

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

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

Yeah i actually just fixed it by changing it to what you had on my own.

Basically: if ( zen_not_null($referrals['sources_name']) ) {

had to be changed to: if ( zen_not_null($referrals->fields['sources_name']) ) {

I did have one more question though - on the customer account creation for the referals dropdown it appears to be pulling Please choose your country for the default selection of the dropdown list, underwhich my input referral sources are located. Any thoughts on how to change this?

Thanks again and ranger lp you're awesome :)

16 Jan 2008, 5:46 AM
#202
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

I just finished adding this mod to my ZenCart 1.38a site.

  1. Before installing I checked all of the files which might exist in my site with WinMerge. Obviously there would not be any problems with any of the "referral" files since they only exist in the mod. The ones to check for possible confilcts with other mods you may have are:
    admin/customers.php
    admin/orders.php
    includes/modules/create_account.php
    includes/templates/YOUR_TEMPLATE/templates/tpl_modules_create_account.php
  2. The database update was done by pasting the contents of the install_referrals.sql file into Admin>Tools>Install SQL Patches. It is useful and informatiive to use phpMyAdmin to verify the changes to the database.
  3. Since I plan to use both this mod and the Discount Coupon Referral feature in ZenCart, I modified the language files to change the headers. The title for the upper box for this mod now reads "How Did You Hear About Us?" and the lower box for the coupon is now titled "Do You Have A Discount Coupon?". This is less confusing for the customer.
  4. I have Admin>Configuration>Customer Details>Require Referral = FALSE and Admin>Configuration>My Store>Display "Other" Referral option = TRUE. The less information that is REQUIRED, the more likely that the customer will complete the registration. Better to use a carrot (like the discount coupon) than a stick.
  5. When I create a customer and enter a Referral Source, the source is shown in BOTH Admin>Customers>Customers>"Referred By" AND in Admin>Extras>Referral Sources.
  6. When I enter a discouint coupon code ONLY, the "Referred By" column reads "--none--". The couipon code is shown in the side box under "1st Discount Coupon" when you select the customer. The coupon does NOT show up in Admin>Reports>Customers Referral until AFTER the coupon is applied to a purchase.
  7. Admin>Extras>Referred Sources counts BOTH those customers who listed "Other" as the referral source and those who did NOT enter any referral source as "Other". When you double click on the "Others" it displays only those who listed an "Other" source. I haven't found where this field is populated to see if I can correct it. NOTE: "Other" has a code of "9999" in the database and the default value for those with NO referral source is "0".

I think this mod will be very useful for market tracking, but there are still odd glitch or two to fix. :cool:

16 Jan 2008, 6:26 PM
#203
wigum avatar

wigum

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

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

Ah in reference i found the default language it was pulling in my english file. Seems silly that it references a generic default drop down option for any menu for a specific dropdown such as country - but it's been replaced.

20 Jan 2008, 8:44 AM
#204
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

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

Hi all,

I installed:
Zen Cart™ Version: v1.3.8
Version: 1.3.8.a
Last Updated: Dec 30 2007
Author: CnTGifts

The "how do you hear about us" does appear on the log in page. However, the information the customers posts does not appear in Admin/customers or Admin/extras/referel sources. Admin/customers shows (referered by is --none--) and
Admin/extras/referel sources shows (other............2).Once i click on it, it disappears, nothing else happens. Also, even if i state that the referrals by customers is required, customers can still carry on without entering anything.

I did the following:

  1. Unpack the zip file to a temporary directory on my hard drive.
    2)Changed the name of the folder "YOUR-TEMPLATE" to my own templatename. This folder is found in the includes/templates folder.
    3)Upload through FTP the includes and admin folders into my web server.
    4)Run install_referrals.sql in Zen cart Install SQL patch.

I can't seem to figure out why its not fully functioning even though i follow exactly the instructions. Also read all the threads in here and somehow see some similar issues faced but still not able to figure out. Really need my fellow zenners assistance.:blush:

20 Jan 2008, 10:22 AM
#205
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

fakesharksfinsoup:

Hi all,
I did the following:

  1. Unpack the zip file to a temporary directory on my hard drive.
    2)Changed the name of the folder "YOUR-TEMPLATE" to my own templatename. This folder is found in the includes/templates folder.
    3)Upload through FTP the includes and admin folders into my web server.
    4)Run install_referrals.sql in Zen cart Install SQL patch.

One thing to watch out for...Don't install the SQL patch by executing the file from the patch tool. Open the install_referrals.sql file with a text editor like Notepad and copy the instructions and then PASTE them into the SQL query window. Personally I prefer to use phpMyAdmin instead of the SQL Patch tool because after the script finishes I check the database to see that the expected tables have been installed. But either should work. It should have installed 2 tables, SOURCES and SOURCES_OTHER. If you are seeing the drop donw box with the referral sources in the Create Account form, that's OK. Most important, it should have ADDED the "customers_info_source_id" column to the CUSTOMER_INFO table.

Did you test the addon by selecting one of the preset sources? Like Google? It should appear in both Admin>Customers>Customers>"Referred by" and Admin>Extras>Referrals.
When you first open Admin>Extras>Referrals the number you see for "Other" includes those customers who selected "Other" for the referral AND those customers who did NOT supply any information. When you double click the "Other" category, only those who selected "Other" are displayed.

Hope this helps.

22 Jan 2008, 2:33 AM
#206
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

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

Hi mauryg, thanks for your kind reply.

I rechecked the tables.
It has ADDED the "customers_info_source_id" column to the CUSTOMER_INFO table.It has installed 2 tables, SOURCES and SOURCES_OTHER also.

So still dont know whats wrong? It seems i will not be able to use this add-on feature as the data entered by the customer is not captured.

Anyone has a remedy for this?

22 Jan 2008, 9:11 AM
#207
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

Fakesharksfinsoup,
OK let's see where we stand.
You said that you could see the Referrals box on the "login" page, but I assume that you mean the "Create Account" section. I am using a split login so the Create Account section is a separate page.
I assume that:

  1. You can see "Require Referral" under Admin>Configuration>Customer Details and that you have set it to "True" or "False" as you wish. I prefer False so as not to annoy my customers.
  2. You can see "Display Other Referral option" on the Admin>Configuration>My Store menu and you have set it to "True".
    Then you should be able to see BOTH the drop down menu for the preset referral sources AND the text box for the "Other" source information.
  3. You have "Referrals" and "Referral Sources" as options under the Admin>Extras menu and that the "Referrals" option is populated with a number of suggested sources (e.g. Google, AOL, etc.)
    If all of the above is true then you probably have installed the mod correctly, but I would still click through the directories to make sure all of the mod files are installed where they belong.
    That's the simple part...
    You said you are using ZenCart v1.38a. I just went back and checked the 4 files which I thought might give the most difficulty because of other mods added and there were no real conflicts. If you have the latest version of the How Did You Hear About Us mod they are essentially v1.38a based files. So you should be OK.
    Can you give me a link to your site so I can look at it?
26 Jan 2008, 2:57 AM
#208
fakesharksfinsoup avatar

fakesharksfinsoup

New Zenner

Join Date:
Jan 2008
Posts:
8
Plugin Contributions:
0

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

hi mauryg,

Thanks for the effort!

For points 1 -3, i am seeing it all in admin.

Just a little background,
i install the following before:
Minimum_order_amount mod
stock_by_attribute_v4_7 mod
how_did_you_hear_about_us mod
newsletter_subscriber_v210 mod

https://www.ecosports.com.sg/onlinestore is my website, still offline at the moment.

26 Jan 2008, 10:21 AM
#209
mauryg avatar

mauryg

Zen Follower

Join Date:
Jul 2006
Posts:
213
Plugin Contributions:
0

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

Hi Fakesharksfinsoup,
I looked at your site and everything seems to be in place on the store side.
I would recheck that ALL of the files were uploaded to the proper directories and that if you are using any override folders, e.g. in the languages folder, that the files are placed properly.
If I were having this problelm, the next thing I would do is browse the database with phpMyAdmin and check the tables directly to see if anything is added when a new account is created. You should see a new row added to the CUSTOMER table and the CUSTOMER_INFO table and if you selected one of the preset referral choices, you should see the ID number of that choice in the customers_info_source_id column. If you select "Other" and type something in the box, then that should appear in the SOURCES_OTHER table along with the customer ID> At least you'll be able to decide if the problem is on the input side or the data is just not getting displayed in the admin panel.
It really is a pretty straight forward mod, Without being able to look at the database or the admin side, I don't what else to suggest.

Hope this helps.

5 Mar 2008, 8:33 AM
#210
stuntsmovie_com avatar

stuntsmovie_com

New Zenner

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

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

@ fakesharksfinsoup

I get the same as you for referral by - none. It only happens when people checkout via Express Checkout or Pay through credit card (Paypal API) without previously creating an account.

If they create an account first, everything works fine for me.

Maybe just a bug that needs to be worked out.

Good Luck!

23 Mar 2008, 5:47 PM
#211
barrys avatar

barrys

New Zenner

Join Date:
Nov 2007
Posts:
7
Plugin Contributions:
0

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

OK, I hope someone can help me because I screwed up and did not do a backup before uploading the files :cry:

The module seems to be working fine BUT I now cannot pull up the customer and/or order lists. I get the following error:

Fatal error: Call to undefined function: zen_get_customers_address_book() in /.../customers.php on line 1125 (address edited for security)

This is the line:
$zc_address_book_count_list = zen_get_customers_address_book($customers->fields['customers_id']);

I get a similar fatal error in orders.php on line 819

This is the line:

<td class="dataTableContent" align="center"><?php echo (zen_get_orders_comments($orders->fields['orders_id']) == '' ? '' : zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', TEXT_COMMENTS_YES, 16, 16)); ?></td>

Any suggestions as to where I go from here??

18 Jul 2008, 1:48 AM
#212
sutikah1 avatar

sutikah1

New Zenner

Join Date:
Jan 2008
Location:
Scotland
Posts:
33
Plugin Contributions:
0

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

I'm getting the following error:

1065 Query was empty
in:
[]

I know this is happening because a selection other than 'Other' was chosen from the dropdown and nothing was put in the 'Other' field. What I don't know is WHY this is happening. Anyone got any ideas?

8 Aug 2008, 3:37 AM
#213
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

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

fakesharksfinsoup:

Hi all,

I installed:
Zen Cart™ Version: v1.3.8
Version: 1.3.8.a
Last Updated: Dec 30 2007
Author: CnTGifts

The "how do you hear about us" does appear on the log in page. However, the information the customers posts does not appear in Admin/customers or Admin/extras/referel sources. Admin/customers shows (referered by is --none--) and
Admin/extras/referel sources shows (other............2).Once i click on it, it disappears, nothing else happens. Also, even if i state that the referrals by customers is required, customers can still carry on without entering anything.

I did the following:

  1. Unpack the zip file to a temporary directory on my hard drive.
    2)Changed the name of the folder "YOUR-TEMPLATE" to my own templatename. This folder is found in the includes/templates folder.
    3)Upload through FTP the includes and admin folders into my web server.
    4)Run install_referrals.sql in Zen cart Install SQL patch.

I can't seem to figure out why its not fully functioning even though i follow exactly the instructions. Also read all the threads in here and somehow see some similar issues faced but still not able to figure out. Really need my fellow zenners assistance.:blush:

Mine was not working, cracked my brain, killed billions of brain cells, and read through many pages in this thread, I finally got it working, so I am posting this in case anyone is in the same situation as I was.

Cart: 1.38a
Mods added:

  • how do you hear from us
  • newsletter only mod

I realized that I did everything correct while installing the referrals mod, but the records are not showing in the admin>customers>customers; nor was it showing in the extra>referral source

I noticed that the installation pack (createaccount) wasn't really pointing to the right directory since I am running a customized template (apple_zen).

In included/modules/create_account.php, it's not overriding on my custom template directory on the server.

(if you are attempting what I did, please save the original file in a temp directory, in case it doesn't work for you, you can reinstate the original file)

My newsletter only mod file is, so it's already overridden with the newsletter only file, I do not want to override the current create account file (which may means my newsletter instruction only may be lost), I opened up the original referral create_account.php file and the copy in my apple_zen directory (create_account.php) and match the 2 files.

Do take note of the 'rmh' code throughout the file, copy and paste them into the original file.

Line 78:
//rmh referral start
$source = zen_db_prepare_input($_POST['source']);
if (isset($_POST['source_other'])) $source_other = zen_db_prepare_input($_POST['source_other']);
//rmh referral end

Line 239:
//rmh referral start
if ((REFERRAL_REQUIRED == 'true') && (is_numeric($source) == false)) {
$error = true;

    $messageStack->add('create_account', ENTRY_SOURCE_ERROR);
}

if ((REFERRAL_REQUIRED == 'true') && (DISPLAY_REFERRAL_OTHER == 'true') &&($source == '9999') && (!zen_not_null($source_other)) ) {
    $error = true;

    $messageStack->add('create_account', ENTRY_SOURCE_OTHER_ERROR);
}

//rmh referral end

Line 320:
//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

For line 320, take note not to have duplicate instruction, otherwise, when you try to create a dummy account, and hit submit, you will get an error message of duplicate.

Now, I created 2 dummy account, one to select a preset 'saplanet blog' selection; one to select 'other' and specified in the text box, I am now able to see the records in the admin>customers>customers>; and also in the admin>extras>referrals source.

Hope this helps.

8 Aug 2008, 3:43 AM
#214
saplanet avatar

saplanet

New Zenner

Join Date:
Jun 2008
Location:
Singapore, Australia, America
Posts:
97
Plugin Contributions:
0

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

just to mention, I am not an expert, so I don't know any smarter way, this is just what works for me, hence the sharing.

18 Nov 2008, 9:50 PM
#215
zlink avatar

zlink

New Zenner

Join Date:
Jul 2008
Posts:
14
Plugin Contributions:
0

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

Hey, I was not recorded data in the bbdd and therefore in the admin. In the admin leave as all others. Someone can help me? thank you very much at all...

20 Nov 2008, 12:33 PM
#216
donostiarra123 avatar

donostiarra123

New Zenner

Join Date:
Nov 2008
Posts:
46
Plugin Contributions:
0

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

Hey, I think I've done everything right, but I get all the records as "other", does not record the option chosen by the customer always comes out "other". I have checked the databases and everything is correct. Help, please! Thank you

22 Nov 2008, 11:24 AM
#217
johns0114 avatar

johns0114

New Zenner

Join Date:
Jun 2007
Location:
Ireland
Posts:
6
Plugin Contributions:
0

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

Hi there,
My head is fried from this now. :frusty:
I follow saplanets steps and uploaded. Nothing has changed so I presume it was setup the same way in the first place.

So, none of my data is appearing in the admin. Right now in admin>extras>referral sources I have 33 'other' sources. When I click into it, there is no data it simply says 'Displaying 0 to 0 (of 0 referral sources)'!! Where's my data gone?

Any advice much appreciated.

Thanks a million

4 Dec 2008, 12:36 AM
#218
get_bucked avatar

get_bucked

New Zenner

Join Date:
Oct 2008
Location:
Sydney, Oz-land
Posts:
45
Plugin Contributions:
0

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

Have a look in "referrals" rather than "referral sources".
"referral sources" seems to be for the original zencart referral code module.

5 Feb 2009, 2:01 PM
#219
mydanilo avatar

mydanilo

Totally Zenned

Join Date:
Dec 2004
Posts:
1,024
Plugin Contributions:
0

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

I just installed 138a-rev2 and merged the files where needed.

All fields show on the register page, drop down can be selected. Form processes.

Admin:

In admin - customers I see the column Referred By but the selection that was made at registration is not showing up. It shows just --none-- but I did select a source at registration. Seems like it did not post to the db?

Also in Referral Sources no listing of the selected source. Referral has all the pre defined sources I set up.

Does anybody have an idea where I should start to look?

18 Feb 2009, 8:30 PM
#220
donn avatar

donn

Zen Follower

Join Date:
Oct 2007
Posts:
241
Plugin Contributions:
0

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

saplanet:

us

  • newsletter only mod

I realized that I did everything correct while installing the referrals mod, but the records are not showing in the admin>customers>customers; nor was it showing in the extra>referral source

I noticed that the installation pack (createaccount) wasn't really pointing to the right directory since I am running a customized template (apple_zen).

In included/modules/create_account.php, it's not overriding on my custom template directory on the server.

Great advice....! The issue I was having with ZC 1.3.8A and this module was solved.

I had been saving the edited 'create_account.php' file in the default folder, and not my custom template.

BUT---when I installed the captcha module last week, I placed THAT create_account.php file in the right folder. So, while captcha worked, neither the DOB pulldown or this module worked. )Because there was a filename in the override template folder with the asme name, ZC was IGNORING the changes I was making to the file in the default directory!)

Both DISPLAYED correctly, but did not pass any values or strings (corresponding to the new mods) to ZC.

The DOB pulldown displayed, but ZC kept telling me the data was not in the right format once I'd submit.

As for the Referrals module, everything displayed Ok on the user's side also, but nothing happened changed in the database once the create_account.php form was submitted.

In the admin, there was an option tomake the Referrals mandatory...

I also had two extra options in Extras - Referrals and Referral Sources.

Referrals was changeable via the admin, but when I'd click on Referral Sources, all I'd get is:

'Other' in one column , and a count of how many times 'other' was selected.

So...the override issue solved both modules having issues.

I hope that my description of what an override issue, (the create_account.php changes not being processed) looks like for both this module, as well as the DOB pull down menu.

Many thanks--I overlooked the obvious.... :dontgetit
Have to start with more simple solutions..... :dontgetit:dontgetit