Re: Can't get "referrals " mod working
I've been trying to get this mod working for ages now, but with no real success.
I've merged my files pretty well (I think) new customers are able to select the various options from the drop down menu at sign up. However, when I go to admin>extras>referral sources all I see is "other":
Sources Referred
Other 82
Displaying 1 to 1 (of 1 referral sources) Page 1 of 1
I've created a few test accounts and selected Google, AOL, etc., etc., from the drop down but no matter what I do, it just updates "other"
When I select "other" and then type something in the box, it does not apprear anywhere.
Also, when I click on customers>customers and then edit the new account, there's no mention of the referrer anywhere.
Where am I going wrong?
Re: Can't get "referrals " mod working
I've just spent the last few hours reading through every single post in this thread. I can see that there's a lot of confusion about the overrides system, but that's not the problem at all.
When you put create_account.php in your includes/modules/CUSTOM folder then that file will be read and the original one in includes/modules/ will be ignored (overridden).
Now, I've just uploaded the create_account.php that shipped with this mod into my CUSTOM folder and it's erradicated the problem I outlined above (referrals not recording in the customers_info_source_id table. With the create_account.php that ships with this mod, the customers_info_source_id is updated correctly and therefore customers>customers is updated, as is extras>referral sources.
The problem therefore is with merging. Obviously I'm not merging my two files correctly!
Re: Can't get "referrals " mod working
I have this working (i think) so i am posting it here until it is activated in downloads. Could you guys test please?
1 Attachment(s)
Re: Can't get "referrals " mod working
HMM, IT DID NOT UPLOAD
I HAD TO REMOVE THE INSTRUCTIONS AND SQL FLE FOR THE SIZE TO BE SMALL ENOUGH TO UPLOAD HERE, BUT THOSE FILES REMAIN THE SAME.
INSTALL.SQL
Code:
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());
README
Code:
Instructions for installing How Did You Hear About Us Version 1.3.9F
================= IMPORTANT =====================
Please BACKUP your store and database before
attempting any of these changes.
I will not be held responsible!
Core files that are modified are:
admin/customers.php
admin/orders.php
admin/includes/languages/english/customers.php
includes/modules/create_account.php
includes/templates/YOUR TEMPLATE/templates/tpl_modules_create_account.php
=================================================
1. This version is compatible with ZenCart Version 1.3.9f - The Updateto 1.3.9a was done by JT Website Design
The update from 1.3.7/8 was
done by Judy Gunderson at http://zencart-ecommerce-website-design.com
The update from 1.3.1 to 1.3.6_beta was done by CES. For support please see
the zen-cart forum http://www.zen-cart.com/forum/showthread.php?t=35623
Contact ranger_lp########################## for versions that are compatible w/1.2.x.
This contribution was converted to ZenCart from the original osCommerce
contribution (See below).
2. Unpack the zip file to a temporary directory on your hard drive. All of the
files are stored in separate directory structures and all files are based on
ZenCart Release 1.3.9f(e.g. admin and includes).
3. Copy the contents of the `how_did_you_hear_about_us_1.3.9f` directory to your
Zen Cart installation except for the `install_referrals.sql` file and this
installation file. If you are using any overrides in ZenCart that include the
files in the this contribution, use an application such as Beyond Compare or
WinDiff to compare your files and resolve any differences.
There is one file:
(\includes\templates\template_default\templates\tpl_modules_create_account.php)
which should be put in your template override folder i.e.
(\includes\templates\YOUR-TEMPLATE\templates\tpl_modules_create_account.php)
4. Run the SQL file install_referrals.sql on your database. You can use the
Install SQL Patches in the ZenCart Admin Panel under Tools -> Install SQL
Patches or you can use phpmyadmin for this purpose.
5. Enjoy your newly installed contribution!
How to Use How Did You Hear About Us Version 1.3.9f
This contrib creates a drop-down box populated by admin entered
(Admin->Extra->Referral) referral sources that prompts the customer where they
found out about the site. Admin can also make this required or not
(Admin->Configuration->Customer Details). Also includes ability to control
whether or not an "Other" appears in the dropdown and if so, displays an
additional text input box (Admin->Configuration->My Store).
Information is then stored in customers_info table for reports and data mining.
Reports are displayed in Admin->Extra->Referral Sources. If you double click on
`Other` a list of all the write in sources from customers will appear with the
dates that they were entered.
Disclaimer
----------
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
(LICENSE) along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA.
Authors
-------
Thanks to Ryan Hobbs for the original osCommerce contribution and Keith W (homewetbar) who added functionality to the osCommerce 1.5 version of this contribution.
Re: Can't get "referrals " mod working
Greetings from Ireland. We are trying to get the How Did You Hear About Us ADD ON working on our site www.irishshopper.com. We installed it as per instructions and everything appears 100% in the Control Panel and we successfully added in a number of extra options in the Source Menu. When you go to the site whoever no new field appears asking the new customer how they found the site but whenever you click SUBMIT you get an error message stating you did not complete the field with an answer re how you heard about the site. So it knows about the field/question but isnt showing it on screen. I have this turned off now but can turn it back on if you want to look at it.
THANK YOU.
Re: Can't get "referrals " mod working
I'm using zen cart 1.3.9d with COWOA. I installed how_did_you_hear_about_us_v139a and it does work as intended. My question/problem is getting it working with COWOA which makes up about half of the checkouts in my cart.
Does anyone have how did you hear about us working with COWOA and if so what files did you work with to get it working?
I have tried copy paste of this rmh referral code
PHP Code:
<!-- //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; ?> -->
<label class="inputLabel" for="source" ><?php echo ENTRY_SOURCE; ?></label>
<?php echo zen_get_source_list('source', (DISPLAY_REFERRAL_OTHER == 'true' ? true : false)) . ' ' . (zen_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
<?php
if (DISPLAY_REFERRAL_OTHER == 'true') {
?>
<label class="inputLabel" for="source_other" ><?php echo ENTRY_SOURCE_OTHER; ?></label>
<?php echo zen_draw_input_field('source_other', '', 'id="sources_other_name"') . (zen_not_null(ENTRY_SOURCE_OTHER_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_OTHER_TEXT . '</span>': ''); ?>
<br class="clearBoth" />
</fieldset>
<?php
}
?>
<!-- //rmh referral end -->
from
/includes/templates/custom/templates/tpl_modules_create_account.php
into
/includes/templates/custom/templates/tpl_no_account_default.php
The input field showed up on the no account checkout form but when the info is entered the referral does not show up in admin/customers/customers
I also pasted the code into
/includes/templates/custom/templates/tpl_modules_no_account.php
the same happens as above. The info doesn't show up in admin.
What am I missing?
Re: Can't get "referrals " mod working
ok I been playing around with it some more and now I think I've got it. The referral input area is displaying on the COWOA form and the referral is making it into admin > customers > customers
So far looks good unless something yet to be discovered was adversely affected by my edits.
The 2 files I edited were
includes/templates/custom/templates/tpl_modules_no_account.php
with rmh code from
includes/templates/custom/templates/tpl_modules_create_account.php
and
/includes/modules/no_account.php
with rmh code from
/includes/modules/create_account.php
The /includes/modules/no_account.php was trickier because it's not at first obvious what needs to be changed.
Re: How to uninstall this module and clear the database?
Quote:
Originally Posted by
lina0962
How to uninstall this module and cllear the database? Thanks!
I need to uninstall also, did you get an answer??
Re: Can't get "referrals " mod working
I have installed this mod. I'm having the same problem with the customer write in referrals not working. If they select other they should be able to leave their source.
Any ideas? I've merged and remerged over and over, doesn't make a difference.
Re: Can't get "referrals " mod working
Quote:
Originally Posted by
joyjoy
I have installed this mod. I'm having the same problem with the customer write in referrals not working. If they select other they should be able to leave their source.
Any ideas? I've merged and remerged over and over, doesn't make a difference.
Try my solution in post #252 above. I couldn't get them to merge either, but simply replacing a couple of ZC files with the files that ship with the mod and eureka. Works a treat for me now.