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 61 to 80 of 365
24 Apr 2007, 1:16 PM
#61
mydanilo avatar

mydanilo

Totally Zenned

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

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

ckunderd:

To ryk and anyone that had the orders.php problem with the referrals mod:

I simply downloaded a fresh install of zen cart and uploaded the new 1.3.7 orders.php file to my admin/ directory. That stopped the error on line 195, and I'm still getting who referred in my customer list. ....

This did the trick for me as well. I wonder what the difference is but I do not have the time right now...it works and will have to do for now. Thank you for the tip.

:clap:

Live and learn... the Zen way.

2 Jun 2007, 11:34 PM
#62
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

I'm getting ready to install this, and wanted to verify something.. Shouldn't I be creating an override for the create_account.php file for this contribution.

i.e.: includes/modules/my_template/create_account.php

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 12:27 AM
#63
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Minnie Mouse:

okay i got the database working if anyone out there needs it here is what i did

in the last two insert lines of the sql file there is a piece at the end of both lines that goes

'zen_cfg_select_option(array('true', 'false'), ', now());

it should read
'zen_cfg_select_option('true', 'false')', now()); I too got the same SQL errors as was reported by a few folks in this thread.. My host is running MySQL 4.0, and I don't know if that is what the difference is or if this is just a syntax error in the contribution's script.. (I'll admit I only know enough SQL to be dangerous..) That said, the above fix did not work for me.. Here is the SQL that did work..

Find:
'zen_cfg_select_option(array('true', 'false'), ', now());

Replace with:
'zen_cfg_select_option(array('true', 'false'),' now());

HTH..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 5:23 AM
#64
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

I should add that even with the changes to the SQL, I still got the errors when I ran this using the SQL Patch installer.. I had to run the corrected insert statements using my MySQL manager..

Also thought that I should share this.. The array values are case sensitive.. Do not make the mistake I did of changing "true" to "True"..:oops:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 2:32 PM
#65
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]

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());

DivaVocals:

I should add that even with the changes to the SQL, I still got the errors when I ran this using the SQL Patch installer.. I had to run the corrected insert statements using my MySQL manager..

Also thought that I should share this.. The array values are case sensitive.. Do not make the mistake I did of changing "true" to "True"..:oops:

3 Jun 2007, 2:39 PM
#66
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]

PS...........

My php version is 4.4.6

SQL is 4.1.21 standard

3 Jun 2007, 5:11 PM
#67
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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??But there has to be some issue going on because reading through this thread at least three others (if I include myself) have reported having the EXACT same error that I got when installing this contribution..

Minnie Mouse:

hi i am getting the same error as another poster from a while back. when i install the sql patch i get this return:

1064 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 'true', 'false'), ', now())' at line 1
in:
[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());]

then i dont get the configuration options in my admin>configuration>mystore and customer details.

Please note that this error occurs exactly in the section I changed to get the insert statements to work.. I too did a fresh install when I was testing this contribution.. I wiped out my dev store and started over with a fresh Zen Cart install.. I still got the error when SQL Patch Admin Tool attempted to execute the last two lines of the SQL that comes with this contribution.. I then attempted to run only those lines using my host's MySQL manager, and got the EXACT SAME error.. I then made the change I posted previously, and the code ran successfully. Once I was able to execute the inserts, the contribution worked perfectly..

Please note there is a slight difference between the SQL I ran and the one that comes with the contribution which I believe makes a difference in getting the error or not.. (I've highlighted that difference below) I also believe that the error message indicates that some versions of MySQL will get this error without making the change I had to make..

Find:
'zen_cfg_select_option(array('true', 'false'), ', now());

Replace with:
'zen_cfg_select_option(array('true', 'false'),'now());

Please note the difference between these two lines.. It really made the difference between getting an error and getting the correct entries into my configuration table and getting this contribution to work. Maybe one of the SQL gurus can chime in and explain why:smartalec:.. I'm pretty sure the answer lies in the differences in MySQL versions..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 5:24 PM
#68
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

I posted this on another thread.. maybe someone reading this thread can help..

DivaVocals:

I wanted to test this, so I created a test customer and chose "Other" I then entered the appropriate data in the "Other" field.. I then went to Extras>Referral Sources and this is what I see:
Sources------------------------Referred
Other --------------------------19

Is the number I see under "Referred" supposed to be a count of how many referrals came from the "Other" referral source?? If so this count is wrong and I need to know how it calculated this count.... More importantly.. How do I fix this???

I've confirmed part of my original question..

The "19" definitely is supposed to represent the number of referrals that came from the "Other" referral source.. However, the count is incorrect. At the time I ran this report, I had only added ONE test customer with "Other" as a referral source in my testing.. I have since added a second customer using the "Other" referral source in order to test that the count is at least incrementing by 1 correctly.. (It is incrementing correctly, and now it shows a count of 20)

So I still need to know how do I correct this so that the count accurately reflects 2 instead of 20.

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 6:13 PM
#69
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]

Do you by any chance have other customers that signed up BEFORE you installed this mod? To try to recreate what you are seeing, I just created another account using "other" as the referral - and the one I created before this I chose google.

However, when I look at the "other" count - it is grouping ALL the customers that signed up prior to me installing this mod this morning into that category.... The "google" count is accurate. Does that make sense what I am saying? :yes:

DivaVocals:

I posted this on another thread.. maybe someone reading this thread can help..

I've confirmed part of my original question..

The "19" definitely is supposed to represent the number of referrals that came from the "Other" referral source.. However, the count is incorrect. At the time I ran this report, I had only added ONE test customer with "Other" as a referral source in my testing.. I have since added a second customer using the "Other" referral source in order to test that the count is at least incrementing by 1 correctly.. (It is incrementing correctly, and now it shows a count of 20)

So I still need to know how do I correct this so that the count accurately reflects 2 instead of 20.

3 Jun 2007, 6:21 PM
#70
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]

If I can get a feel for what versions of mysql and php are being used to see if that is the problem, I could add a new file to the contribution that specifies the versions ..... so if anyone that has had this problem can post those two statistics, we can see if there is a common denominator.......

3 Jun 2007, 6:42 PM
#71
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

stellarweb:

Do you by any chance have other customers that signed up BEFORE you installed this mod? To try to recreate what you are seeing, I just created another account using "other" as the referral - and the one I created before this I chose google.

However, when I look at the "other" count - it is grouping ALL the customers that signed up prior to me installing this mod this morning into that category.... The "google" count is accurate. Does that make sense what I am saying? :yes:Ahhhhh.... Yes this somewhat makes sense.. (though my previous customer count is "slightly" off by two) Dunno why I didn't think of this myself!:wacko: Despite that this is somewhat inaccurate ya know??? Especially since you can drill into the the report to get the details behind "Other", you wouldn't necessarily KNOW this, nor would you want to HAVE to factor out prior everytime you ran this report.... Seems to me there should be a better way to handle existing customers.. In the meantime I will manually update the sources_other table with data to make the previous customers a tad more meaningful when drilling into the "Other" source details..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 7:19 PM
#72
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

I took a look at my customer_info table and figured out the customer count discrepancy. I updated the customer_info and sources_other tables and now the counts and reports reflect more accurate information.. (I created a generic "Other" source for all of the prior customers) I will make a note to myself that next time I use this contribution that I probably need to do it as part of a virgin install of Zen Cart so that the counts on the report are accurate from the very start..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

3 Jun 2007, 10:29 PM
#73
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]

Sounds like you have it all figured out!! :laugh::flex:

4 Jun 2007, 1:58 PM
#74
wadi73 avatar

wadi73

New Zenner

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

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

Hi, I have MySQL client version: 4.1.10 on phpMyAdmin - 2.9.0.2

I installed the sql patch for how_did_you_hear_about_us_1.3.6_beta, as I have zencart version Zen Cart 1.3.6

The error I get is below. I haven't a clue about sql, and I am not a programmer. Any way to resolve it?

1064 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 'true', 'false'), ', now())' at line 1
in:
[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());]

4 Jun 2007, 2:07 PM
#75
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]

Try Changing your
'zen_cfg_select_option(array('true', 'false'), ', now()); to

'zen_cfg_select_option(array('true', 'false'), ', now());

and see if that helps.

Wadi73:

Hi, I have MySQL client version: 4.1.10 on phpMyAdmin - 2.9.0.2

I installed the sql patch for how_did_you_hear_about_us_1.3.6_beta, as I have zencart version Zen Cart 1.3.6

The error I get is below. I haven't a clue about sql, and I am not a programmer. Any way to resolve it?

1064 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 'true', 'false'), ', now())' at line 1
in:
[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());]

4 Jun 2007, 2:12 PM
#76
wadi73 avatar

wadi73

New Zenner

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

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

How do I do that? :blush:

4 Jun 2007, 3:20 PM
#77
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Wadi73:

How do I do that? :blush:You need to edit the contribution's SQL patch to include the suggested fix.. I am not a programmer either, but I do know from experience that if you are not familiar with your MySQL tools and/or if you do not know how to edit the SQL patch, then you will require assistance beyond the scope of this forum.. (Most of the team members assume/hope that you are at least familiar with how to use your MySQL tools)

From one newbie to another, my suggestion is that you read through this entire thread. There is a LOT of information in this thread.. (including a RECENT discussion of the very error you posted along with HOW to fix it) In general it's best to search through these forums first before posting a question. A lot of the answers are already here as others like you and me have run into similar issues.. HTH

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

4 Jun 2007, 3:23 PM
#78
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

stellarweb:

Sounds like you have it all figured out!! :laugh::flex: I feel so smart now!:smartalec: Thanks for your help!!!:clap:

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

5 Jun 2007, 7:13 AM
#79
wadi73 avatar

wadi73

New Zenner

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

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

Hi DivaVocals,
Thanks for your suggestion. I did read through the thread before posting, but although I saw the suggested code replacement, it doesn't actually say where in the sql table it is needed. I can replace the code if I know exactly where it is e.g. in phpmyadmin, I am at the zencart database. I am assuming, maybe wrongly lol that the needed coding is under the table entitled "configuration", but that has loads of values.

5 Jun 2007, 3:41 PM
#80
divavocals avatar

divavocals

Totally Zenned

Join Date:
Jan 2007
Location:
Los Angeles, California, United States
Posts:
10,011
Plugin Contributions:
3

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

Wadi73:

Hi DivaVocals,
Thanks for your suggestion. I did read through the thread before posting, but although I saw the suggested code replacement, it doesn't actually say where in the sql table it is needed. I can replace the code if I know exactly where it is e.g. in phpmyadmin, I am at the zencart database. I am assuming, maybe wrongly lol that the needed coding is under the table entitled "configuration", but that has loads of values.You need to modify the SQL patch that is part of this contribution. (as per the suggestions in the previous posts) You can then either re-run the entire SQL patch again using the SQL patch tools or simply re-run the edited statements. Again you can use the SQL patch installer in the Zen Cart Admin or you can run these statements from your hosts SQL Admin tool. Or if you understand how to read the affected lines in the contribution SQL, you can use your MySQL tools to add the appropriate data to the configuration table..

My Site - Zen Cart & WordPress integration specialist
I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.