Jump to content

[Minor] How did you find us mod


Guest

Recommended Posts

File Name :: How did you find us mod

Author :: EvilHomeR

Category :: Minor

Description

This will add a small table once a customer has registered asking them to tick a checkbox

telling you how they found your site.

This mod has only been installed locally and not tested fully yet so you use at own risk

It all seems ok but please remember to back up your files

This can be modded to suit you needs to change the options just edit the english.inc.php file

so it displays what you want.

View File

Link to comment
Share on other sites

  • 4 weeks later...

File Name :: How did you find us mod

Author :: EvilHomeR

Category :: Minor

Description ::

This will add a small table once a customer has registered asking them to tick a checkbox

telling you how they found your site.

This mod has only been installed locally and not tested fully yet so you use at own risk

It all seems ok but please remember to back up your files

This can be modded to suit you needs to change the options just edit the english.inc.php file

so it displays what you want.

Updated Wed, Jun 8 2005 7:45 pm

View File

Edited by Guest
Link to comment
Share on other sites

If not Evilhomer, can anyone help me with this mod? I installed it very well, it gives me no error, however it doesn't fulfill the objective which is getting info from the client. After the client tells where he heard about us and clicks enter, I don't receive that info anywhere, where does that info goes? what can be missing? :P

Link to comment
Share on other sites

Guest Emediate

Did you end up working this out? I'd like to install it, but only if I can work out where the info goes :P

Link to comment
Share on other sites

I am looking into this but im very busy at the moment with my clients as i stated in the mod i only tested this locally and it worked ok there.As soon as i get some free time i will read over code.

<<<sorry peeps

Link to comment
Share on other sites

the data is emailed to the store email when they click on ok there is a bug in this which i have now solved.Im rewriting install instructions and will upload l8r 2day.

Link to comment
Share on other sites

Hi, nails.com.au!

I am also waiting for Evilhomer to help us. He is a very busy guy but I trust he will save some time for us soon. I must say that installation was very easy and the message actually appears after the client has registered, the problem is that when he wirtes the info and clicks ....nothing happens, it goes to the frontpage and you don't get any info in your mail, which is the purpose of the mod.

For me (and I guess for anyone) it is very useful to know from the clients where they have heard about my site....so EvilHomer, please, helpppppp us!!!!!!!

Link to comment
Share on other sites

sorry guys i have finished this just forgot to repost im on computer at work as soon as i get back home in a couple of hours i will post code for you

sorry again :D

Link to comment
Share on other sites

ok i did already

pls delete from register php and follow info below

open control_panel.php

find

<tr bgcolor=\"$colour_1\">

<td width=\"40%\">&nbsp;</td>

<td width=\"60%\"><input type=\"submit\" class=\"submit\" name=\"submit\" value=\"$la_register\"><br>$la_account_form_must</td>

</tr>

</table>

</td>

</tr>

</table>

</form>";

}// end if !$edit

straight after paste

//*********************************************************

//start found us table

//*********************************************************

if (session_is_registered("valid_user"))

{

if($ShoppingCart)

{

$session = $ShoppingCart;

}

sb("100%",$la_mod_found_tableheader,$colour_1,$bg_colour);

if (!$Submitmail) {

$select = mysql_query ("select * from ".$prefix."store_customer where email='$valid_user'");

$row = mysql_fetch_array($select);

$from_name=$row["name"];

$from_email=$row["email"];

echo"<b>$la_mod_found_header</b><br>

<form method=\"post\" action=\"index.php\">

<br>$la_mod_found_subheader<br><br>

<div align=\"left\">

<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"400\">

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt1\" value=\"$la_mod_found_opt1\"></td>

<td width=\"100%\"><b>$la_mod_found_opt1</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt2\" value=\"$la_mod_found_opt2\"></td>

<td width=\"100%\"><b>$la_mod_found_opt2</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt3\" value=\"$la_mod_found_opt3\"></td>

<td width=\"100%\"><b>$la_mod_found_opt3</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt4\" value=\"$la_mod_found_opt4\"></td>

<td width=\"100%\"><b>$la_mod_found_opt4</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt5\" value=\"$la_mod_found_opt5\"></td>

<td width=\"100%\"><b>$la_mod_found_opt5</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt6\" value=\"$la_mod_found_com_opt6\"></td>

<td width=\"100%\"><b>$la_mod_found_com_opt6</b></td>

</tr>

</table>

</div>

<input type=\"hidden\" name=\"from_name\" value=\"$from_name\">

<input type=\"hidden\" name=\"from_email\" value=\" $from_email\">

<br><b>$la_mod_found_example</b><br />

$la_mod_found_examples<br>

<textarea name=\"Message\" cols=\"40\" rows=\"4\"></textarea><br>

<input type=\"submit\" class=\"submit\" value=\"$la_go\" border=\"0\" name=\"Submitmail\">

</form>";

} else {

$subject ="$la_mod_found_tableheader";

if(empty($opt1)){$opt1= "";}else{$opt1= "$opt1\n";}

if(empty($opt2)){$opt2= "";}else{$opt2= "$opt2\n";}

if(empty($opt3)){$opt3= "";}else{$opt3= "$opt3\n";}

if(empty($opt4)){$opt4= "";}else{$opt4= "$opt4\n";}

if(empty($opt5)){$opt5= "";}else{$opt5= "$opt5\n";}

if(empty($opt6)){$opt6= "";}else{$opt6= "$opt6\n";}

$sugmail="$from_name,$from_email $la_mod_found_made \n\n$site_url/control_panel.php";

mail($site_email,$subject,"$found\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n$opt1$opt2$opt3$opt4$opt5$opt6\n$la_mod_found_message\n$Message","From: $from_email");

echo "$la_mod_found_thx $from_name<hr width=\"100%\" align=\"left\">";

}

eb($bg_colour,$colour_1);}

// if no session is registered

if (!session_is_registered("valid_user"))

{

echo"";

}

echo"</FORM></td></tr>";

//*********************************************************

//end suggestions table

//*********************************************************

Now open admin/english.inc.php

and paste in mod section

//************************

// Found us mod

//************************

$la_mod_found_tableheader="How did you find us";

$la_mod_found_header="Please fill out the form below";

$la_mod_found_subheader="Your help will assist us to improve our site";

$la_mod_found_opt1="Google";

$la_mod_found_opt2="Yahoo";

$la_mod_found_opt3="Msn";

$la_mod_found_opt4="Ask Jeeves";

$la_mod_found_opt5="Other search engine";

$la_mod_found_com_opt6="Adverts:";

$la_mod_found_examples="If you came from advert or link on another website please list below.";

$la_mod_found_made="said they found you from:";

$la_mod_found_thx="Thank you,";

$la_mod_found_message="Message:";

the bits in red are what i changed if you want it on different page you need to change bits in red to wot page you want it on.

Edited by evilhomer
Link to comment
Share on other sites

Guest Emediate

Thanks so much for following this up... but now I am a tad confused. Is the above code in addition to the downloadable hack ?

Link to comment
Share on other sites

Hi Evil Homer,

This will be a nice mod. I`ve had a go at it but haven`t got it together. The form shows up and looks nice but not receiving the info from the form via email at all. No email. Nearly there but not quite. May be my problem yet rather than the code but still looking at it.

Thanks for the effort so far.

Link to comment
Share on other sites

Have you used my revised edition of this and put into the right page?

Can you tell me what page you have installed this on and then post the code from that page and I will look at it for you.

Link to comment
Share on other sites

Hi Evil,

Thanks.

Tried the revised and then went to downloads at Cube Home and tried that version as well.

I couldn`t find the original code out of control_panel.php to paste under so that might be the problem.

This is the total file of what i have there at present. Installed on Control Panel OK.

Ta

<?php

/***************************************************************************

* File Info: control_panel.php

* Purpose: Control Panel for Customer

* Updated: 31/07/2003

****************************************************************************

* Developer: Alistar Brookbanks (Brooky.com)

* Copyright: ©2003 http://www.brooky.com

* Copyright: ©2003 http://www.cubecart.com

* This program is not "free" software and restrictions apply!

* Further Info: http://www.cubecart.com/license.php

* Contact [email protected] if any conditions are not clear.

*

* Licensees holding valid "CubeCart Licence Number" may edit

* the (powered by CubeCart) from browser title and "Powered by CubeCart"

* and "© Brooky.com" from the web page footer.

*

* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING

* THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR

* PURPOSE. This and all others in the download package can only be

* redistributed with written permission from Alistair Brookbanks!

*

* The "CubeCart License" is available to purchase at

* https://secure.cubecart.com/

* For pricing please contact us via e-mail at [email protected]

***************************************************************************/

session_start();

if (!session_is_registered("valid_user"))

{

header("Location: login.php");

}

if (session_is_registered("valid_user"))

{

include("admin/config.php");

include( "admin/settings.inc.php");

include( "shoppingcart.php");

include( "header.inc.php");

$cart = new Cart;

include("subheader.inc.php");

// start border

sb("100%",$la_your_links,$colour_1,$bg_colour);

echo"<a href=\"index.php\" target=\"_self\">$la_search_home</a> > $la_your_links<br><br>

<b>$la_your_links&nbsp;$la_for</b>&nbsp;$user_name<br>";

$sql_count = "select * from ".$prefix."store_order_sum where email='$valid_user'";

$result_count = mysql_query ($sql_count);

$total_orders = mysql_num_rows($result_count);

$total_orders = number_format($total_orders);

echo"<table align=\"center\" width=\"60%\" border=\"0\" cellspacing=\"25\" cellpadding=\"0\">

<tr align=\"center\" valign=\"bottom\">

<td><a href=\"account.php?session=$session\"><br><img src='images/your_account.gif' border='0'><br>$la_account_account</a></td>

<td><a href=\"your_orders.php?session=$session\"><img src='images/your_orders.gif' border='0'><br>$la_status_orders";

if($total_orders>0)

{

echo"&nbsp;($total_orders)";

}

echo"</a></td>

</tr>

<tr align=\"center\" valign=\"bottom\">

<td><a href=\"account.php?session=$session\"><img src='images/password.gif' border='0'><br>$la_change_password</a></td>

<td><a href=\"#\" target=\"_self\"><span style='cursor:hand;' onclick='window.external.AddFavorite(location.href,document.title);'><img src='images/favorites.gif' border='0'><br>$la_status_favourite</span></a></td>

</tr>

<tr align=\"center\" valign=\"bottom\">

<td><a href=\"view_cart.php?session=$session\"><img src='images/your_basket.gif' border='0'><br>$la_status_basket</a></td>

<td><a href=\"logout.php?session=$session\"><img src='images/logout.gif' border='0'><br>$la_logout</a></td>

</tr>

</table><br>";

// end border

eb($bg_colour,$colour_1);

//*********************************************************

//start found us table

//*********************************************************

if (session_is_registered("valid_user"))

{

if($ShoppingCart)

{

$session = $ShoppingCart;

}

sb("100%",$la_mod_found_tableheader,$colour_1,$bg_colour);

if (!$Submitmail) {

$select = mysql_query ("select * from ".$prefix."store_customer where email='$valid_user'");

$row = mysql_fetch_array($select);

$from_name=$row["name"];

$from_email=$row["email"];

echo"<b>$la_mod_found_header</b><br>

<form method=\"post\" action=\"index.php\">

<br>$la_mod_found_subheader<br><br>

<div align=\"left\">

<table border=\"0\" cellpadding=\"0\" cellspacing=\"1\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"400\">

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt1\" value=\"$la_mod_found_opt1\"></td>

<td width=\"100%\"><b>$la_mod_found_opt1</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt2\" value=\"$la_mod_found_opt2\"></td>

<td width=\"100%\"><b>$la_mod_found_opt2</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt3\" value=\"$la_mod_found_opt3\"></td>

<td width=\"100%\"><b>$la_mod_found_opt3</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt4\" value=\"$la_mod_found_opt4\"></td>

<td width=\"100%\"><b>$la_mod_found_opt4</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt5\" value=\"$la_mod_found_opt5\"></td>

<td width=\"100%\"><b>$la_mod_found_opt5</b></td>

</tr>

<tr>

<td width=\"49\">&nbsp;<input type=\"checkbox\" name=\"opt6\" value=\"$la_mod_found_com_opt6\"></td>

<td width=\"100%\"><b>$la_mod_found_com_opt6</b></td>

</tr>

</table>

</div>

<input type=\"hidden\" name=\"from_name\" value=\"$from_name\">

<input type=\"hidden\" name=\"from_email\" value=\" $from_email\">

<br><b>$la_mod_found_example</b><br />

$la_mod_found_examples<br>

<textarea name=\"Message\" cols=\"40\" rows=\"4\"></textarea><br>

<input type=\"submit\" class=\"submit\" value=\"$la_go\" border=\"0\" name=\"Submitmail\">

</form>";

} else {

$subject ="$la_mod_found_tableheader";

if(empty($opt1)){$opt1= "";}else{$opt1= "$opt1\n";}

if(empty($opt2)){$opt2= "";}else{$opt2= "$opt2\n";}

if(empty($opt3)){$opt3= "";}else{$opt3= "$opt3\n";}

if(empty($opt4)){$opt4= "";}else{$opt4= "$opt4\n";}

if(empty($opt5)){$opt5= "";}else{$opt5= "$opt5\n";}

if(empty($opt6)){$opt6= "";}else{$opt6= "$opt6\n";}

$sugmail="$from_name,$from_email $la_mod_found_made \n\n$site_url/control_panel.php";

mail($site_email,$subject,"$found\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n$opt1$opt2$opt3$opt4$opt5$opt6\n$la_mod_found_message\n$Message","From: $from_email");

echo "$la_mod_found_thx $from_name<hr width=\"100%\" align=\"left\">";

}

eb($bg_colour,$colour_1);}

// if no session is registered

if (!session_is_registered("valid_user"))

{

echo"";

}

//*********************************************************

//end suggestions table

//*********************************************************

include("subfooter.inc.php");

include("footer.inc.php");

}

?>

Link to comment
Share on other sites

sorry guys my bag again i forgot to close of the form

find this at bottom of mod

{

echo"";

}

and change to

{

echo"";

}

echo"</FORM></td></tr>";

this should solve all your problems now - sorry again

Link to comment
Share on other sites

i think this may be your problem then are you still trying to send data from register page?

You need to delete the mod from register.php first as its installed in control panel page now.If you log in as a customer and proceed to your control panel where you can view orders,change password etc... you should have new box at bottom with how did you find us mod.

put in your answer and click go you should now see you control panel with thank you message underneath if you see that its worked and you should get email.

Link to comment
Share on other sites

Hi Evil Homer,

Sorry i am a little confused now...does the mod need to be in register.php or control_panel?

I see a problem..

The first instruction of your mod was to open control_panel .....see below.....but the code you have listed to paste under was from register.php...see your code below....

"This will add a small table once a customer has registered asking them to tick a checkbox

telling you how they found your site.

first back up all files!!!!

I have put this on bottom of control panel page you may find you want it somewhere else but it looks

nice here

open control_panel.php

find

<tr bgcolor=\"$colour_1\">

<td width=\"40%\">&nbsp;</td>

<td width=\"60%\"><input type=\"submit\" class=\"submit\" name=\"submit\" value=\"$la_register\"><br>$la_account_form_must</td>

</tr>

</table>

</td>

</tr>

</table>

</form>";

}// end if !$edit

straight after paste

//*********************************************************

//start found us table

//*********************************************************

etc etc.

open control_panel.php

Link to comment
Share on other sites

Right the problem was i had this on modded store and trying to rip it out caused 1 or 2 errors.Here goes

1. delete mod of register.php file it doesnt go there

2. leave english.inc file we still need that

3. put mod revised in earlier post with red writing and edited by into control_panel.php as explained.

thats it now when a customer logs in on site and goes to there control panel it shows a box asking how they found you.try it if it works when u click on go it should take u back to control panel page with a thank you message in box where form was.

Link to comment
Share on other sites

Right the problem was i had this on modded store and trying to rip it out caused 1 or 2 errors.Here goes

1. delete mod of register.php file it doesnt go there

2. leave english.inc file we still need that

3. put mod revised in earlier post with red writing and edited by into control_panel.php as explained.

thats it now when a customer logs in on site and goes to there control panel it shows a box asking how they found you.try it if it works when u click on go it should take u back to control panel page with a thank you message in box where form was.

Link to comment
Share on other sites

×
×
  • Create New...