Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How Did You Hear About Us - Support


Recommended Posts

This is the thread for my "How Did You Hear About Us" contribution.

 

Description:

Creates a drop-down box populated by admin entered referral sources that prompts the

customer where they found out about the site.

 

Admin can also make this required or not.

 

Also includes ability to control whether or not an "Other" appears in the dropdown and if so, displays an additional text input box.

 

Download here:

http://www.oscommerce.com/community/contributions,2159

Edited by hobbzilla
Link to comment
Share on other sites

  • Replies 318
  • Created
  • Last Reply

Top Posters In This Topic

I'm having trouble w/ the contribution, & was hoping you could help. I can't seem to upload the update.sql file into my PHPMyAdmin. it's giving me an error, saying there is a line w/ line 4. Is there somethign wrong with the SQL file or code?

 

Because of this, the whole site is down, and giving this error:

 

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home3/nextlm/nlmotoring-www/catalog/includes/functions/general.php:1275) in /home3/nextlm/nlmotoring-www/catalog/includes/functions/sessions.php on line 67

 

 

Thanks for your help!!

Link to comment
Share on other sites

I there,

 

I am having problems with the SQL file also!

 

I have the drop down box but when I try to create a new account by clicking ok I get:

 

"1054 - Unknown column 'customers_info_source_id' in 'field list'

 

insert into customers_info (customers_info_id, customers_info_number_of_logons, customers_info_date_account_created, customers_info_source_id) values ('60', '0', now(), '1')

 

[TEP STOP]"

 

I dont think the tables have been added properly, also using phpadmin.

 

Cheers for any information, really good contribution!

 

Bren

Link to comment
Share on other sites

Forgot to update a portion of the sql file after initial change was made to table `sources_other`. Thanks for the report! Doh! I have updated the contribution. Enjoy!

 

SHOULD BE:

==========

 

CREATE TABLE sources_other (

customers_id int NOT NULL,

sources_other_name varchar(64) NOT NULL,

PRIMARY KEY (customers_id),

);

 

{vs. PRIMARY KEY (sources_other_customers_id), }

Link to comment
Share on other sites

Great Contrib!

 

I have a suggestion to "kick it up another notch" I've done this already on my site, but I didn't want to step on your contrib, and you're probably (when I say probably, I mean you are) a much better coder than I am.

 

Here's what I did. I made the textbox for "other" populate if it has anything in it at all. I added other/referral and a tiny note that if they were referred by another customer to enter the name into the box and they will get a gift cert for referring them after their first order (they must be a member that has placed an order also)

 

I added the code to admin side customers.php to see if they were referred (=4) and if so, the name of the person, makes it easier for me to track it and who to send the gift cert to.

 

It wasn't too hard, and of course this is only for Strider's CCGV, but it was just a thought...

 

Noel

Edited by nrlatsha

9 times out of 10 its a PEBCAK Error (Problem exists between chair and keyboard)

 

Replace that and you're fine...

Link to comment
Share on other sites

  • 2 weeks later...

I have found a bug in this great mod although I do not know where to look to fix it maybe someone else here knows.

Anytime someone picks OTHER the bug adds 1 every one of the people that are listed and 1 to the source they picked, its hard to explain without showing so here is a screen shot of what im talking about this says it all:

 

screenshotref.jpg

 

there are 3 people that said OTHER and each one had a different OTHER source typed in but its comming up as 9 people total and 3 for each. When there were only 2 people it had 2 for each OTHER source and 4 people total

 

any help would be appreaciated

Thanks

Link to comment
Share on other sites

nrlatsha,

You are not ever steping on anyones toes by added a contribution of any kind. It helps all of us. If some wants to use it they will, if they dont they wont, its up to them but at least they will have the option. As long as you give the original person credit for what you post there is nothing wrong with sharing help to all, thats what the original authors are also doing. If you type Steel Shadow on the contrib site you will see a number of places that I have added a little here or there. Also I was going to do the EXACT same thing you did with the GV and referrel. So please post it on the contrib site or here to help us all.

 

Thanks

~Steel~

Link to comment
Share on other sites

I'm having the same issue as Steel - i multiplies the number of others by the total nubmer of other responses posted, so with fifteen entries in other, a response of '1' would show '15', a response with 3 would show '45' etc.

I have confirmed. A fix will be available shortly. This bug has to do with the split_page_results() function being used.

Link to comment
Share on other sites

I've installed this contribution and all the files except the create account.php are installed correctly. It appears that with my default files, that most of the info is not in the create account.php but in the includes/modules/account details.php. I did replace the create account.php with the contribution one to see, but then I get 2 kinds of errors.

 

The first one is on the create account.php page itself;

Line 22

char 3

'document.account_edit.firstname is not null or not an object;

 

Then I get this;

PHP Warning: Failed to connect to mailserver, verify your "SMTP" setting in php.ini in D:\hshome\lwyllie\starslings.com\catalog\includes\classes\email.php on line 500 PHP Warning: Cannot add header information - headers already sent in D:\hshome\lwyllie\starslings.com\catalog\includes\functions\general.php on line 29

 

I've verified the php.ini file. I've also checked to make sure there are no spaces before or after the php p> code, etc.

 

I would really appreciate it if someone could help me.

Thanks,

Lisa

Link to comment
Share on other sites

I have installed this contribution and works fine for the predifined results that you can enter, but if someone chooses other and enters a name or whatever - this isn't showing up in admin>reports>referral sources.

 

Does anyone have an answer to this?

Link to comment
Share on other sites

Do you think it's likely not an error with the contribution but rather with the smtp server instead? If I install the contribution, it works more or less as in the customer signing up info is placed in the database as well as the referrer information but after they do the sign up that error I mentioned above earlier pops up and they don't receive an email confirming their registration.

Link to comment
Share on other sites

lisa,

 

This is not due to an error in the contribution. The contrib did not affect any SMTP settings or change anything in that regard. I would suggest performing this install in a test environment on a fresh MS2 install and see if you are still getting those errors.

Link to comment
Share on other sites

I'm having the same issue as Steel - i multiplies the number of others by the total nubmer of other responses posted, so with fifteen entries in other, a response of '1' would show '15', a response with 3 would show '45' etc.

 

I think I have a solution to this problem. Can a those who are having this problem test the following changes?

 

In stats_referral_sources.php find:

    $referrals_query_raw = "select count(ci.customers_info_source_id) as no_referrals, so.sources_other_name as sources_name from " . TABLE_CUSTOMERS_INFO . " ci, " . TABLE_SOURCES_OTHER . " so where ci.customers_info_source_id = '9999' group by so.sources_other_name order by so.sources_other_name DESC";

 

And change it to:

    $referrals_query_raw = "select count(ci.customers_info_source_id) as no_referrals, so.sources_other_name as sources_name from " . TABLE_CUSTOMERS_INFO . " ci, " . TABLE_SOURCES_OTHER . " so where ci.customers_info_source_id = '9999' and so.customers_id = ci.customers_info_id group by so.sources_other_name order by so.sources_other_name DESC";

 

This should now correctly reflect the numbers of "Other" sources.

 

I have also modded this to work with PWA. I anyone wants to find out how I'll try to formulate the changes into a coherent post.

 

Cheers

Tim

Link to comment
Share on other sites

I've been checking out the Data Base to see if I could find out exactly who chose what sources and it is listed in there. now what I was trying ot do was make a place on the customer screen where it will list the source next to each persons name.

 

Kinda like this:

Untitled-1.jpg

 

I looked in the customer.php file and believe that its just a simple couple of lines to add to link the info from the data base but am having problems. I did find another contribution that does this somewhat, but combing the two was not successful and impractical as this one works much better.

 

All I need to do is match up the customer_ID with the customers_info_source_id and display it on the customer pages. It will give you the info if you look in the customers_info Table.

 

Any Ideas? :huh:

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...