New Zenner
- Join Date:
- Oct 2008
- Location:
- Midwest USA
- Posts:
- 71
- Plugin Contributions:
- 0
Solved - How did you hear about us in Check Out
Hi All,
If you are one of the many ZC users who want a "How did you hear about us" (aka HDYHAU) field in your checkout page there is now a solution!
But first a little background, like many others I tried the "How did you hear about us" mod and it works great but it only shows up during new user registration. I have came across several users who needed it in Check Out (myself included) but there hasn't been a fix posted in the forum, until now...
I seriously considered modifying the HDYHAU mod so it would be in checkout, I even asked for help on this but the authors were simply to busy. But I thought "someone else must have needed this functionality" and sure enough, after digging through the forum with a fine tooth comb I read a one sentence reference to a magical mod called "Ad Manager"
Knowing that all is not always as it seems in Zen Cart mods I went ahead and installed the mod in a test cart to see if it did what I thought it would and sure enough it does! It places a select box into the check out page that says "Where did you see our ad?" By default a user is required to fill this in but you can change this so it's not required in:
includes\modules\pages\checkout_confirmation\header_php.php
You can also change the text to say something other than "Where did you see our ad?" in one of the defines files.
And it works like a charm!
There are a couple of gotchas though, and they are:
-
The SQL patch is buried in the text of the readme file but it's confusing and you would have to know to strip out the extraneous text... however I have fixed and have included the base SQL in a block below.
-
As it currently stands the mod doesn't have a way of letting the user enter an "Other" source like the HDYHAU mod, it requires a user to enter this information in the comments section of the check out page. Personally I can live with that, but I may try to add the "Other Advertiser" field some day.
Here is the link:
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=116
Here is the SQL code:
CREATE TABLE advertizers (
`advertizer_id` int(11) NOT NULL auto_increment,
`advertizer_name` varchar(40) NOT NULL default '',
`advertizer_enabled` int(4) NOT NULL default '1',
PRIMARY KEY (advertizer_id)
) TYPE=MyISAM;
INSERT INTO `advertizers` (`advertizer_name`) VALUES
('EBAY'),
('FRIEND'),
('Other - describe below in comments area');
CREATE TABLE ad_stats (
`orders_id` int(11) NOT NULL ,
`advertizer_id` int(11) NOT NULL ,
PRIMARY KEY (orders_id)
) TYPE=MyISAM;
It isn't the cleanest mod to install but if you take your time and work slow you should be just fine.
Thanks to JeffD for creating the Ad Manager Mod
Best of luck,
Gary777
PS: I'm not the author and I can't support this mod but will try to assist users where I can. Also - I take no responsibility for your use of this mod, backup your files and data before you use it!