Re: Can't get "referrals " mod working
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 :)
Comments on the "referrals " mod
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:
Re: Can't get "referrals " mod working
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.
Re: Can't get "referrals " mod working
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:
Re: Can't get "referrals " mod working
Quote:
Originally Posted by
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.
Re: Can't get "referrals " mod working
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?
Re: Can't get "referrals " mod working
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?
Re: Can't get "referrals " mod working
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
www.ecosports.com.sg/onlinestore is my website, still offline at the moment.
Re: Can't get "referrals " mod working
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.
Re: Can't get "referrals " mod working
@ 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!