Jump to content
hobbzilla

How Did You Hear About Us - Support

Recommended Posts

Problem sorted....

 

There was a file missing from the "IF MODIFYING ONLY" files <_< . I downloaded it from the "IF ON CLEAN" files instead.

 

Karen

Ditto. Thanks for finding it - it was driving me nuts.

 

I think the install package may need to be updated...

Share this post


Link to post
Share on other sites
Ditto.  Thanks for finding it - it was driving me nuts.

 

I think the install package may need to be updated...

 

Glad I was of some help instead of asking for it for a change :D

 

Karen


If at first you don't succeed, GIVE UP!!!!!!

Share this post


Link to post
Share on other sites

Hi,

Thanks for the great contribution.

I just have one problem and that is with the layout of the table.

I can't change the layout to look like other tables.

here is the link to my create_account.php page: CLICK HERE

 

Please let me know how can I change the table layout (and color) so it looks like other fields on the page. :thumbsup:


Regards,

Share this post


Link to post
Share on other sites

Hi all, I am a complete :-" newbie in oscommerce, and am in the process of getting to grips with all this php so please excuse my knowledge! Anyways found this contribution and fits my needs completly. Downloaded the contibution, unzipped it, installed both sets of the files (fresh and modifyed ones), Now onto the hard bit :( mysql and phpmyadmin! i have not a single clue about either! when i log into cpanel i do see mysql, but searched evrywhere and cant find phpmyadmin. The time of this post os 1:45 am after hours of searching through google and oscommerce forums searching for the answer still........ nothing. I managed to download phpmyadmin and thats about it! something about ftp? and also uploading to root directory which makes no sense to me!

 

Would appreciate any help or directions in the right way.

 

Understandable if no1 has the the time to show me as you seem all to be pros...

 

Thanks anyway

 

Regards

Ant

Share this post


Link to post
Share on other sites

Ant, Click on MySQL. The page that comes up should have a link to phpMyAdmin near the bottom.

 

-jared

Share this post


Link to post
Share on other sites

Hey guys, When trying to create a new account, i get the error:

 

 

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 ('68', '0', now(), '7')

 

[TEP STOP]

 

 

 

Also, in admin, When i click onto "Customers" I get the error:

 

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 ('68', '0', now(), '7')

 

[TEP STOP]

 

 

I follwed the instructions that mention searching for a duplicate "TABLE_CUSTOMERS_INFO" in catalog\create_account.php

 

However i dont

 

PLEASE HELP!

Share this post


Link to post
Share on other sites

Hi,

Thanks for the great contribution.

I just have one problem and that is with the layout of the table.

I can't change the layout to look like other tables.

here is the link to my create_account.php page: http://bargaincollection.com/shop/create_account.php

 

Please let me know how can I change the table layout (and color) so it looks like other fields on the page. :thumbsup:


Regards,

Share this post


Link to post
Share on other sites

Just regarding the SQL queries to be put into the database: can anyone tell me what the consequences would be if, instead of the standard 5 line code provided in the contribution, I entered an additional line into the database and also changed the names of some of the other standard codes:

 

INSERT INTO sources VALUES (1, 'Google');

INSERT INTO sources VALUES (2, 'Yahoo');

INSERT INTO sources VALUES (3, 'A link on another website');

INSERT INTO sources VALUES (4, 'Saw an ad in a magazine');

INSERT INTO sources VALUES (5, 'Referred by a friend');

INSERT INTO sources VALUES (6, 'I am a returning customer');

 

Would there be any consequence at all or can we simply go ahead and enter as many referral thingies as we like?

Share this post


Link to post
Share on other sites
Just regarding the SQL queries to be put into the database: can anyone tell me what the consequences would be if, instead of the standard 5 line code provided in the contribution, I entered an additional line into the database and also changed the names of some of the other standard codes:

 

INSERT INTO sources VALUES (1, 'Google');

INSERT INTO sources VALUES (2, 'Yahoo');

INSERT INTO sources VALUES (3, 'A link on another website');

INSERT INTO sources VALUES (4, 'Saw an ad in a magazine');

INSERT INTO sources VALUES (5, 'Referred by a friend');

INSERT INTO sources VALUES (6, 'I am a returning customer');

 

Would there be any consequence at all or can we simply go ahead and enter as many referral thingies as we like?

Well I modified the table so that it has the above referral sources in it - it didn't seem to do anything to the database. Now, I've modified all the files as required by the contribution instrucitons, but when I get to order_info.php to enter in my name and address details the drop down referral box doesn't appear. When I highlight the section where its supposed to appear, you can see that there is definitely something that's trying to come out (http://www.tallpoppycraft.com/catalog/order_info.php?osCsid=) down between the continue button and the fax number box. If anyone can provide any ideas as to what might be wrong I'd appreciate it!

Share this post


Link to post
Share on other sites

Re my problem in the post just above: I think this has something to do with the fact that I have PWA. If anyone can provide some insttruction on how to get this contribution working with PWA I'd appreciate it.

Share this post


Link to post
Share on other sites
Re my problem in the post just above: I think this has something to do with the fact that I have PWA. If anyone can provide some insttruction on how to get this contribution working with PWA I'd appreciate it.

Regarding Tim's post of July 11 2004, he has kindly provided me with the code to that will make this referral contribution compatible with PWA. I post the code here with his permission:

 

In catalog/includes/modules/Order_Info_Check.php add:

 

<!-- //rmh referral start -->
    <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
    </tr>
    <tr>
      <td class="main"><b><?php echo CATEGORY_SOURCE; ?></b></td>
    </tr>
    <tr>
      <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
        <tr class="infoBoxContents">
          <td><table border="0" cellspacing="2" cellpadding="2">
            <tr>
              <td class="main"><?php echo ENTRY_SOURCE; ?></td>
              <td class="main"><?php echo tep_get_source_list('source', (DISPLAY_REFERRAL_OTHER == 'true' ? true : false)) . ' ' . (tep_not_null(ENTRY_SOURCE_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_TEXT . '</span>': ''); 
    if ($entry_source_error) {
      echo '  ' . ENTRY_SOURCE_ERROR;
    } 
  ?></td>
            </tr>
<?php
if (DISPLAY_REFERRAL_OTHER == 'true') {
?>
            <tr>
              <td class="main"><?php echo ENTRY_SOURCE_OTHER; ?></td>
              <td class="main"><?php echo tep_draw_input_field('source_other') . ' ' . (tep_not_null(ENTRY_SOURCE_OTHER_TEXT) ? '<span class="inputRequirement">' . ENTRY_SOURCE_OTHER_TEXT . '</span>': ''); 
    if ($entry_source_other_error) {
      echo '  ' . ENTRY_SOURCE_OTHER_ERROR;
    } 
  ?></td>
            </tr>
<?php
}
?>
          </table></td>
        </tr>
      </table></td>
    </tr>
<!-- //rmh referral end -->

 

This comes after the section for fax number in my version. i.e. directly after:

<?php
if ($is_read_only) {
  echo $account['customers_fax'];
} elseif ($processed) {
  echo $fax . tep_draw_hidden_field('fax');
} else {
  echo tep_draw_input_field('fax', $account['customers_fax']) . ' ' . ENTRY_FAX_NUMBER_TEXT;
}
?></td>
        </tr>
      </table></td>
    </tr>
  </table></td>
</tr>

Share this post


Link to post
Share on other sites

Awww Crap !

 

I've had this working for months without issue

 

In the last few days I have done something to kill it

 

And can't seem to understand what

 

Fatal error: Call to undefined function: tep_get_source_list() in /home/leatherandlaceftp/www/catalog/create_account.php on line 534

 

 

Any hints muchly appreciated :blush:

Share this post


Link to post
Share on other sites
Awww Crap !

 

I've had this working for months without issue

 

In the last few days I have done something to kill it

 

And can't seem to understand what

 

Fatal error: Call to undefined function: tep_get_source_list() in /home/leatherandlaceftp/www/catalog/create_account.php on line 534

Any hints muchly appreciated  :blush:

 

Call me stupid !

 

I have been religiously making backups of each file I edit

 

That aint stupid

 

But restoring the wrong one is !

 

How Embarassment

Share this post


Link to post
Share on other sites

hi all, i need to select all users from my table and i made this query

 

 

SELECT customers .*, address_book .*, sources_other .* FROM customers INNER JOIN address_book ON address_book . customers_id =customers . customers_id

JOIN sources_other ON sources_other . customers_id=customers . customers_id

WHERE customers . customers_id >500000

 

 

but this only selects the customers who has referrals, and i need them all

 

can someone help me ?

 

Thanks.

Share this post


Link to post
Share on other sites
hi all, i need to select all users from my table and i made this query

SELECT customers .*, address_book .*, sources_other .* FROM customers INNER JOIN address_book ON address_book . customers_id =customers . customers_id

JOIN sources_other ON sources_other . customers_id=customers . customers_id

WHERE customers . customers_id >500000

but this only selects the customers who has referrals, and i need them all

 

can someone help me ?

 

Thanks.

 

 

i'm sorry this last post -

 

this query don't shows me the referrals from the drop down menu .

 

What's wrong...

Share this post


Link to post
Share on other sites

i have this file to export my customers info and i need to export the referrals too : how can i change my file.

 

Thanks.

 

<?php

 

require('includes/application_top.php');

 

if (!$HTTP_GET_VARS['submit'])

 

{

 

?>

 

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//DE">

 

<html <?php echo HTML_PARAMS; ?>>

 

<head>

 

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">

 

<title><?php echo TITLE; ?></title>

 

<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">

 

</head>

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#CCCC33">

 

<!-- header //-->

 

<?php require(DIR_WS_INCLUDES.'header.php'); ?>

 

<!-- header_eof //-->

 

 

 

<!-- body //-->

 

  <table border="0" width="100%" cellspacing="2" cellpadding="2" >

 

  <tr>

 

    <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">

 

<!-- left_navigation //-->

 

<?php require(DIR_WS_INCLUDES.'column_left.php'); ?>

 

<!-- left_navigation_eof //-->

 

    </table></td><td>

 

<!-- body_text //-->

 

 

 

<?php

 

echo "<center><font face=verdana size=2>Exportar e Guardar dados dos clientes no seu computador<br> ID superior a 500 000</font><br><br>";

 

echo '<form action="'. $phpself.'">';

 

echo '<input type="submit" value="Clientes Novos" name="submit"></form>';

 

 

?>

 

</td>

 

</table>

 

<!-- footer //-->

 

<center><font color="#666666" size="2"></font></center>

 

<!-- footer_eof //-->

 

<br>

 

</body>

 

</html>

 

<?php

 

}

 

else

 

{

$fim_linha = chr(13).chr(10);

$fim_file = "[FIM]";

 

 

$contents5=$fim_file; //final de ficheiro

 

$contents1="primeiro nome;ultimo nome;contribuinte;codigo cliente;email;morada;freguesia;codigo postal;localidade;telefone;newsletter;password;xxx\n";

 

$user_query = mysql_query('SELECT c. * , adb. *

FROM customers AS adb

LEFT  JOIN address_book AS c ON adb.customers_id = c.customers_id

WHERE customers_default_address_id = c.address_book_id and c.customers_id>500000');

 

while($row = mysql_fetch_array($user_query))

 

{

if ($row[entry_gender]=='m')

{

  $contents.="Masculino".";";

}

if ($row[entry_gender]=='f')

{

  $contents.="Feminino".";";

}

if ($row[entry_gender]=='')

{

  $contents.=" ".";";

}

 

  $contents.=$row[customers_firstname].";";

 

  $contents.=$row[customers_lastname].";";

 

  if( $row[customers_dob]=='0000-00-00 00:00:00')

  {

  $contents.="N?o especificado".";";

  }

  else

  {

  $contents.=$row[customers_dob].";";

  }

  $contents.=$row[entry_NIF].";";

 

  $contents.=$row[customers_id].";";

 

  $contents.=$row[customers_email_address].";";

 

  $contents.=$row[entry_street_address].";";

 

  $contents.=$row[entry_postcode]." - ".$row[entry_city].";";

 

  $contents.=$row[entry_zone_id].";";

 

 

  //$contents.=$land.";";

 

  $contents.=$row[customers_telephone].";";

 

  $contents.=$row[customers_newsletter].";";

 

  $contents.=$fim_linha;

 

 

 

}

 

Header("Content-Disposition: attachment; filename=clientes_novos.csv");

 

print $contents;

 

print $contents5;

 

}

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

 

?>

Share this post


Link to post
Share on other sites

I think there is a bug in the code - when the DISPLAY_REFERRAL_SOURCE variable is set to false (i.e. 'Display Referral options if "ref=###" is set' is FALSE), the referral form is NEVER displayed.

 

The way I understand the functionality, this variable should cause the form to be hidden ONLY if a ref=xxx referal was supplied. If not supplied, the form should still be displayed.

 

This occurs becuase the variable referral_id is ALWAYS registered, even if it is blank.

 

To fix this:

 

In catalog\includes\application_top.php

 

change

 

//rmh referral start
// set the referral id
 if (!tep_session_is_registered('referral_id') || isset($HTTP_GET_VARS['ref'])) {

 

to

 

//rmh referral start
// set the referral id
 if (!tep_session_is_registered('referral_id') && isset($HTTP_GET_VARS['ref'])) {

 

Cheers

Rob

Share this post


Link to post
Share on other sites

I also am using PWA and need this to work on a per-order basis. I've inserted the code above (thanks, BTW!) into Order_Info_Check, and I had to make some additional changes to Order_Info_Process to make it required. That's working fine, however, I'm not sure how to get this selection to actually go into the db in the "referral_id" field I created for it in the orders table. Has anyone gotten anything similar working? Thanks.

Share this post


Link to post
Share on other sites
I also am using PWA and need this to work on a per-order basis. I've inserted the code above (thanks, BTW!) into Order_Info_Check, and I had to make some additional changes to Order_Info_Process to make it required. That's working fine, however, I'm not sure how to get this selection to actually go into the db in the "referral_id" field I created for it in the orders table. Has anyone gotten anything similar working? Thanks.

 

Ah, okay, I think I've got it working. Although I haven't even tried dealing with "other" strings yet.

 

I ended up having to put the field in the customers table after all (I thought I could skip the customers table since the customers don't create accounts; I didn't realise its function as a temporary holding place). Also, I had to modify the class in order.php to include this variable. Whee! :-)

Share this post


Link to post
Share on other sites

Hi, :thumbsup:

Thank you all for this great contribution.

Could someone please explain how can we add the referral column to the orders.php. It is very hard to get back to the customers.php every time to check where that customer came from.

 

Thank you. :)


Regards,

Share this post


Link to post
Share on other sites

What a handy contribution, many thanks.

 

How would I go about being able to export the referals to this report?

 

 

CUSTOMER EXPORT Version 1.0

<?php

echo "Export and Save Customer Data onto your Local Machine";

echo '<form action="'. $phpself.'">';

echo '<input type="submit" value="Export" name="submit"></form>';

?>

</td>

</table>

<!-- footer //-->

<center><font color="#666666" size="2"></font></center>

<!-- footer_eof //-->

<br>

</body>

</html>

<?php

}

else

{

$contents="Firstname,Lastname,Gender,DOB,Company,Address,Zip,City,State,Country,Phone,

Email,Fax\n";

$user_query = mysql_query('select c.*, adb.* from customers as c left join address_book as adb on c.customers_id = adb.customers_id');

while($row = mysql_fetch_array($user_query))

{

if ($row[customers_gender]=="m")

{

$gender = "Male";

}

else

{

$gender = "Female";

}

 

if ($row[entry_country_id] == 81)

{

$land="Deutschland";

}

else

{

$country_query = mysql_query("select countries_name from countries where countries_id = '" . $row[entry_country_id] . "';");

$landq = mysql_fetch_array($country_query);

$land=$landq[countries_name];

}

 

$contents.=$row[customers_firstname].",";

$contents.=$row[customers_lastname].",";

$contents.=$gender.",";

$contents.=$row[customers_dob].",";

 

$contents.=$row[entry_company].",";

$contents.=$row[entry_street_address].",";

$contents.=$row[entry_postcode].",";

$contents.=$row[entry_city].",";

$contents.=$row[entry_piva].",";

$contents.=$land.",";

 

$contents.=$row[customers_telephone].",";

$contents.=$row[customers_email_address].",";

$contents.=$row[customers_fax]."\n";

}

Header("Content-Disposition: attachment; filename=export.csv");

print $contents;

}

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

Edited by VPSsupport

Regards,

Clive

Share this post


Link to post
Share on other sites

GREAT Contrib!!!

 

Is there anyway I could have it activated but without been obligatory to be filled up??

 

I have the problems that the "Other" Referral option must be filled even if they do not choose "other" option.. :(

 

So I would like to have them vidible, but not a must field to be filled :D

 

 

Anyway, it works fine!!!! :thumbsup:

Share this post


Link to post
Share on other sites

Hi all; I installed the contrib, and all went wel except for one part - it all works except that, although the Referral choice is required, it's not enforced when registering a new account. It doesn't appear on the validation dialogue along with the other fields.

 

I've checked my code, but might be having code blindness now... any pointers would be much appreciated.

 

All works fine, no errors, just no validation/enforcement of the referral source drop-down

 

Cheers,

Bill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×