Jump to content
jcall

All Customers Report

Recommended Posts

When you click on All Customers in admin->Reports, you should see a page where you can run a report. If you don't see that, then you've made a mistake in the installation or something in your shop is preventing it from displaying.

Share this post


Link to post
Share on other sites

When you click on All Customers in admin->Reports, you should see a page where you can run a report. If you don't see that, then you've made a mistake in the installation or something in your shop is preventing it from displaying.

 

Hi Jack,

 

No, I just have an empty page. Could you review my steps and let me know if I put something in the wrong location? The steps were so easy, I did them twice and still no luck. I did all the steps except for the option step at the end. Here is what I did:

 

===========================

STEP 1 (file copy)

===========================

Copied both included .php files to these directories:

 

I put "add_customers.php" into the catalog/admin folder

I put "all_customers.php" into the catalog/admin/includes/languages/english folder

 

===========================

STEP 2 (filenames.php)

===========================

Added at the end of the file, // through // below in this file:

catalog/admin/includes/filenames.php

 

define('FILENAME_TAX_CLASSES', 'tax_classes.php');

define('FILENAME_TAX_RATES', 'tax_rates.php');

define('FILENAME_WHOS_ONLINE', 'whos_online.php');

define('FILENAME_ZONES', 'zones.php');

// All Customers contrib

define('FILENAME_ALL_CUSTOMERS', 'all_customers.php');

// END All Customers contrib

?>

 

 

===========================

STEP 3 (Add link in Admin)

===========================

Edited the reports.php file as seen below and replaced it in this location:

catalog/admin/includes/boxes/reports.php.

 

if ($selected_box == 'reports') {

$contents[] = array('text' => '<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_VIEWED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_VIEWED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_PRODUCTS_PURCHASED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_PRODUCTS_PURCHASED . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_ALL_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ALL_CUSTOMERS . '</a><br>' .

'<a href="' . tep_href_link(FILENAME_STATS_CUSTOMERS, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_REPORTS_ORDERS_TOTAL . '</a>');

}

 

$box = new box;

echo $box->menuBox($heading, $contents);

?>

</td>

</tr>

<!-- reports_eof //-->

 

===========================

STEP 4 (Language Files)

===========================

Add the following just before the closing ?> in this file:

catalog/admin/includes/languages/english.php

 

 

// All Customers contrib

define('BOX_REPORTS_ALL_CUSTOMERS', 'All Customers');

// END All Customers contrib

?>

 

 

==================================

STEP 5 (Add new Functions)

==================================

Add the following just before the closing ?> in this file:

catalog/admin/includes/functions/general.php

 

 

// Sort Function

function tep_sort_order ($orderby, $sorted, $title, $order_criteria){

global $csv_accum;

if (!isset($orderby) or ($orderby == $order_criteria and $sorted == "ASC")) $to_sort = "DESC"; else $to_sort = "ASC";

 

$field = strip_tags($title);

$field = ereg_replace ("\"","\"\"",$field);

if ($csv_accum=='') $csv_accum= "\"" . $field . "\"";

else

{if (strrpos($csv_accum,chr(10)) == (strlen($csv_accum)-1)) $csv_accum .= "\"" . $field . "\"";

else $csv_accum .= "," . "\"" . $field . "\""; };

$link = '<a href="' . tep_href_link(FILENAME_ALL_CUSTOMERS, 'orderby=' . $order_criteria .'&sorted='. $to_sort) . '" class="headerLink">' . $title . '</a>';

return $link;

}

 

// Produce CSV string for output

function mirror_out ($field) {

global $csv_accum;

echo $field;

$field = strip_tags($field);

$field = ereg_replace ("\"","\"\"",$field);

if ($csv_accum=='') $csv_accum= "\"" . $field . "\"";

else

{if (strrpos($csv_accum,chr(10)) == (strlen($csv_accum)-1)) $csv_accum .= "\"" . $field . "\"";

else $csv_accum .= "," . "\"" . $field . "\""; };

return;

};

?>

Share this post


Link to post
Share on other sites

It looks OK. If you have the admin access contribution installed (there will be an administators section in admin), you have to enable the files first. If your server has error reporting turned off, it could be that you are missing a file and not seeing the failure so be sure that all files have been uploaded. Otheriwse, I don't know what it might be.

Share this post


Link to post
Share on other sites

I just installed this - we're selling the business, and need to generate a customer list for the new owners (they won't be using osCommerce).........

 

I'm getting the following error:

 

Parse error: syntax error, unexpected $end in /home/thegals/public_html/catalog/admin/all_customers.php on line 292

 

 

Here is my copy of the file:

 

<?php

/*

$Id: all_customers.php, v1.0 March 21, 2005 18:45:00

adapted by Robert Goth June 24, 2005

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2002 - 2004 osCommerce

 

written by Jared Call at client' suggestion

some code nicked and modified from /catalog/admin/customers.php

Released under the GNU General Public License

*/

 

// entry for bouncing csv string back as file

// Turn on output buffering

 

ob_start();

if (isset($_POST['csv'])) {

if (isset($HTTP_POST_VARS['saveas'])) { // rebound posted csv as save file

$savename= $HTTP_POST_VARS['saveas'] . ".csv";

}

else $savename='unknown.csv';

 

$csv_string = '';

if ($HTTP_POST_VARS['csv']) $csv_string=$HTTP_POST_VARS['csv'];

 

if (strlen($csv_string)>0) {

header("Expires: Mon, 26 Nov 1962 00:00:00 GMT");

header("Last-Modified: " . gmdate('D,d M Y H:i:s') . ' GMT');

header("Cache-Control: no-cache, must-revalidate");

header("Pragma: no-cache");

header("Content-Type: text/csv");

header("Content-Disposition: attachment; filename=$savename");

echo html_entity_decode(stripslashes($csv_string), ENT_QUOTES);

}

else echo "CSV string empty";

 

exit;

};

 

 

 

 

require('includes/application_top.php');

 

?>

 

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

<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">

<script language="javascript" src="includes/general.js"></script>

</head>

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

<!-- 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>

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

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

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE_ALL_CUSTOMERS; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

$where = '';

$nsChecked = array();

if (isset($_GET['group_newsletter'])) {

switch ($_GET['group_newsletter'])

{

case 'Newsletter_On': $where = ' c.customers_newsletter = 1 ';

$nsChecked['on'] = 'checked';

break;

case 'Newsletter_Off': $where = ' c.customers_newsletter != 1 ';

$nsChecked['off'] = 'checked';

break;

default: $where = '';

$nsChecked['both'] = 'checked';

}

}

else

$nsChecked['both'] = 'checked';

 

if (tep_not_null($where))

$where = ' where ' . $where;

 

$datePeriod = '';

if (isset($_GET['date_start']) && tep_not_null($_GET['date_start'])) {

if (isset($_GET['date_stop']) && tep_not_null($_GET['date_stop'])) {

$start = sprintf("'%s-%s-%s 0:0:0'", substr($_GET['date_start'], 4), substr($_GET['date_start'], 0, 2), substr($_GET['date_start'], 2, 2));

$stop = sprintf("'%s-%s-%s 0:0:0'", substr($_GET['date_stop'], 4), substr($_GET['date_stop'], 0, 2), substr($_GET['date_stop'], 2, 2));

$datePeriod = ' ci.customers_info_date_account_created between ' . $start . ' and '.$stop . ' ';

}

{

if (tep_not_null($datePeriod))

{

if (tep_not_null($where))

$where .= ' and ' . $datePeriod;

else

$where = ' where ' . $datePeriod;

}

 

$today = date("mdY");

?>

<?php echo tep_draw_form('news_date', FILENAME_ALL_CUSTOMERS, '', 'get') . tep_draw_hidden_field('process_form', 'process_form') . tep_hide_session_id(); ?>

<tr>

<td><table border="0" width="60%" cellspacing="0" cellpadding="0">

<tr class="smallText">

<td><?php echo ENTRY_GROUP_NEWSLETTER; ?></td>

<td><INPUT TYPE="radio" NAME="group_newsletter" VALUE="Newsletter_On" <?php echo $nsChecked['on']; ?> ><?php echo TEXT_NEWSLETTER_SUBSCRIBED; ?></td>

<td><INPUT TYPE="radio" NAME="group_newsletter" VALUE="Newsletter_Off" <?php echo $nsChecked['off']; ?> ><?php echo TEXT_NEWSLETTER_UNSUBSCRIBED; ?></td>

<td><INPUT TYPE="radio" NAME="group_newsletter" VALUE="All" <?php echo $nsChecked['both']; ?> ><?php echo TEXT_NEWSLETTER_BOTH; ?></td>

</tr>

</table></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><table border="0" width="60%" cellspacing="0" cellpadding="0">

<tr class="smallText">

<td width="80"><?php echo ENTRY_DATE_START; ?></td>

<td><?php echo tep_draw_input_field('date_start', '', 'maxlength="8" size="8"', false); ?> </td>

<td width="80" align="center"><?php echo ENTRY_DATE_STOP; ?></td>

<td><?php echo tep_draw_input_field('date_stop', $today, 'maxlength="8" size="8"', false); ?> </td>

<td><?php echo TEXT_EXPLAIN_DATE; ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<tr>

<td><input type="submit"></td>

</tr>

</table></td>

</tr>

</form>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>

</tr>

<?php

// Used to determine sorting order by field

switch ($orderby) {

 

case "email" :

$db_orderby = "c.customers_email_address";

break;

 

case "newsletter" :

$db_orderby = "c.customers_newsletter";

break;

 

case "address":

$db_orderby = "a.entry_street_address";

break;

 

case "city":

$db_orderby = "a.entry_city";

break;

 

case "state":

$db_orderby = "z.zone_code";

break;

 

case "country":

$db_orderby = "co.countries_name";

break;

 

case "telephone":

$db_orderby = "c.customers_telephone";

break;

 

case "pcode":

$db_orderby = "a.entry_postcode";

break;

 

default :

$db_orderby = "a.entry_lastname";;

break;

}

 

$customers_query_raw = "SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_newsletter, c.customers_fax, c.customers_telephone, c.customers_gender, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM " . TABLE_CUSTOMERS . " c LEFT JOIN " . TABLE_CUSTOMERS_INFO . " ci on c.customers_id = ci.customers_info_id LEFT JOIN " . TABLE_ADDRESS_BOOK . " a ON c.customers_id = a.customers_id and c.customers_default_address_id = a.address_book_id left join " . TABLE_ZONES . " z ON a.entry_zone_id = z.zone_id left join " . TABLE_COUNTRIES . " co ON a.entry_country_id = co.countries_id $where ORDER BY $db_orderby $sorted" ;

 

if ($start)

{

$customers_query = tep_db_query($customers_query_raw);

$num_rows = tep_db_num_rows($customers_query);

 

if ($num_rows)

{

?>

<!-- BOF HEADER -->

<tr>

<td width="100%"><table border="0" width="100%">

<tr class="dataTableHeadingRow">

<?php /*<td class="dataTableHeadingContent"><?php echo TABLE_HEADING_NUMBER; ?></td> */ ?>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, FULL_NAME, 'name');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, EMAIL, 'email');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, ADDRESS, 'address');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, CITY_NAME, 'city');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, STATE, 'state');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, POSTAL_CODE, 'pcode');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, CONTRY_NAME, 'country');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, TELEPHONE_NUMBER, 'telephone');?></td>

<td class="dataTableHeadingContent"><?php echo tep_sort_order ($orderby, $sorted, 'NewsLetter', 'newsletter');?></td>

<!-- EOF HEADER -->

</tr>

<?php

while ($customers = tep_db_fetch_array($customers_query)) {

if ( tep_not_null($customers['customers_id']) ) {

$rows++;

if (strlen($rows) < 2) {

$rows = '0' . $rows;

}

 

$firstName = explode(" ", $customers['entry_firstname']);

$csv_accum .= "\n";

 

$email = '<a href="mailto:' . $customers['customers_email_address'] . '">' . $customers['customers_email_address'] . '</a>';

$full_name = '<a href="customers.php?cID=' . $customers['customers_id'] . '&action=edit">' . ucfirst(strtolower($firstName[0])) . " " . ucfirst(strtolower($customers['entry_lastname'])) . '</a>';

?>

<tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">

<?php /* <td align="left" class="dataTableContent"><?php echo $rows; ?>.</td> */ ?>

<td class="dataTableContent"><?php mirror_out($full_name);?></td>

<td class="dataTableContent"><?php mirror_out($email); ?></td>

<td class="dataTableContent"><?php mirror_out($customers['entry_street_address']); ?></td>

<td class="dataTableContent"><?php mirror_out($customers['entry_city']); ?></td>

<td class="dataTableContent"><?php mirror_out($customers['zone_code']); ?></td>

<td class="dataTableContent"><?php mirror_out($customers['entry_postcode']); ?></td>

<td class="dataTableContent"><?php mirror_out($customers['countries_name']); ?></td>

<td class="dataTableContent"><?php mirror_out ($customers['customers_telephone']); ?></td>

<td class="dataTableContent"><?php mirror_out ($customers['customers_newsletter']); ?></td>

</tr>

<?php

}

} //while

?>

</table></td>

</tr>

<?php

} else {

echo '<tr><td class="main" style="color: red;">'.ERROR_NO_MATCHES. '</td></tr>';

} //if num rows

} //end of if start

?>

 

<!-- body_text_eof //-->

</tr>

<?PHP

if ($num_rows > 0 && !$print) {

?>

 

 

<td class="smallText" colspan="4"><form action="<?php echo $_SERVER['PHP_SELF']; ?>" method=post>

<input type='hidden' name='csv' value='<?php echo htmlentities($csv_accum, ENT_QUOTES); ?>'>

<?php //suggested file name for csv, include year and month ?>

<input type='hidden' name='saveas' value='Customer_List_<?php echo date("Y" . "_" . "m" . "_" . "d" . "_" . "Hi"); ?>'><input type="submit" value="<?php echo TEXT_BUTTON_REPORT_SAVE ;?>"></form>

</td>

</tr>

<?php }; // end button for Save CSV ?>

</table>

 

 

<!-- body_eof //-->

 

 

 

 

 

<!-- footer //-->

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

<!-- footer_eof //-->

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

</body>

</html>

Share this post


Link to post
Share on other sites

I've installed version All Customers Report V 2_1d by Jack_mcs. Everything works fine except for sorting. Each time I submit the query and the report shows up I then try to sort a column and it goes back to the start page where you have to submit query button again, but it never sorts. I think I installed everything right. Does anyone else have this problem? Otherwise the contribution works great.

 

Thanks in advance for any help!

Share this post


Link to post
Share on other sites

The way the code is written uses a non-standard way of handling the form and the form settings are not getting passed to the sort routine. There's not an easy fix that I can see for that though. I will look at it when I get a chance if someone doesn't do it before that.

Share this post


Link to post
Share on other sites

The way the code is written uses a non-standard way of handling the form and the form settings are not getting passed to the sort routine. There's not an easy fix that I can see for that though. I will look at it when I get a chance if someone doesn't do it before that.

 

Thanks Jack for the quick reply!

 

Yeah, after I posted I checked back in the thread and found that someone else had the same problem posted a few months ago.

 

Anyway, I appreciate your work on the contribution. Ultimately, I know I can always download the csv and then sort it in Excel.

 

I appreciate when you get a chance to look into it....

 

BTW...I have used many of your great contributions (I know...shameless flattery).

 

Thanks!

Share this post


Link to post
Share on other sites

Hi i installed version V2.1d and i got "CSV string empty" why is that happened ?Anyway i followed someone hack tips at page 9 that he move the application_top.php include above the $csv_string variable..And it works to me with unknown file name but i can save it anyway..

 

Also i can't sort the customers Name into alphabet when i clicked Name at the table title, it always back to the previous page. And the last thing i want to ask is that how can i export the data just like at the All Customers page which is very neat with the table view per column title.

 

Thanks

Share this post


Link to post
Share on other sites

Hi i installed version V2.1d and i got "CSV string empty" why is that happened ?Anyway i followed someone hack tips at page 9 that he move the application_top.php include above the $csv_string variable..And it works to me with unknown file name but i can save it anyway..

 

Also i can't sort the customers Name into alphabet when i clicked Name at the table title, it always back to the previous page. And the last thing i want to ask is that how can i export the data just like at the All Customers page which is very neat with the table view per column title.

 

Thanks

I don't have an answer for the first two, thoug I think they have been covered in this thread. For the last, the report can be exported to a spreadsheet file. You have adjust the look of it in your spreadsheet program.

Share this post


Link to post
Share on other sites

I don't have an answer for the first two, thoug I think they have been covered in this thread. For the last, the report can be exported to a spreadsheet file. You have adjust the look of it in your spreadsheet program.

 

Thanks Jack for the reply. Yeah I finally can managed the csv into excel tabel column.

 

By the way, according to what does the customers listing sorted with ? I want to sorted according to recent joined or first joined. Is it possible to do that ?I've looked to the code that apparently the coloumn of "customers_info_date_account_created" isn't in customers Table but it's in the customers_info Table. I Just don't how to put the database query into your code.

Share this post


Link to post
Share on other sites

Thanks Jack for the reply. Yeah I finally can managed the csv into excel tabel column.

 

By the way, according to what does the customers listing sorted with ? I want to sorted according to recent joined or first joined. Is it possible to do that ?I've looked to the code that apparently the coloumn of "customers_info_date_account_created" isn't in customers Table but it's in the customers_info Table. I Just don't how to put the database query into your code.

Yes, it is possible but beyond the normal support offered in a thread like this.

Share this post


Link to post
Share on other sites

Yes, it is possible but beyond the normal support offered in a thread like this.

 

Hi jack, i'd like to ask again about this query below :

$customers_query_raw = "SELECT c.customers_id , c.customers_default_address_id, c.customers_email_address, c.customers_newsletter, c.customers_fax, c.customers_telephone, c.customers_gender, a.entry_company, a.address_book_id, a.customers_id, a.entry_firstname, a.entry_lastname, a.entry_street_address, a.entry_suburb, a.entry_city, a.entry_state, a.entry_postcode, a.entry_country_id, a.entry_zone_id, z.zone_code, co.countries_name FROM " . TABLE_CUSTOMERS . " c LEFT JOIN " [b]. TABLE_CUSTOMERS_INFO . " ci on c.customers_id = ci.customers_info_id [color="#FF0000"]and ci.customers_info_date_account_created[/color] LEFT JOIN [/b]" . TABLE_ADDRESS_BOOK . " a ON c.customers_id = a.customers_id  and c.customers_default_address_id = a.address_book_id left join " . TABLE_ZONES . " z ON a.entry_zone_id = z.zone_id left join " . TABLE_COUNTRIES . " co ON a.entry_country_id = co.countries_id $where ORDER BY $db_orderby $sorted" ;

 

You see at the bold text code is the Customers_Info table query and the red code is for to query the coloumn of "customers_info_date_account_created" which I believe it's invalid code :P

 

What is the correct query code to call "customers_info_date_account_created" coloumn so i can display it in the new tabel data ?

Share this post


Link to post
Share on other sites

Hi Jack,

 

I was upgrading my site to be PHP 5.3 compatible today (just in case) and I noticed that admin/includes/functions/general.php uses eregs twice at the end of the file in the 'Sort Function' and 'Produce CSV String for output' sections.

 

line 1712:

$field = ereg_replace ("\"","\"\"",$field);

 

line 1726:

$field = ereg_replace ("\"","\"\"",$field);

 

Would you know how to change ereg to preg in these 2 lines?

 

Also, the add-ons section of the forum shows that a new version of All Customers Report was uploaded on October 8. But the latest one showing is from February of 2009. Was that your upload by any chance or some random edits by someone else?

 

Thanks,

 

Nick

Share this post


Link to post
Share on other sites

Hi Jack,

 

I was upgrading my site to be PHP 5.3 compatible today (just in case) and I noticed that admin/includes/functions/general.php uses eregs twice at the end of the file in the 'Sort Function' and 'Produce CSV String for output' sections.

 

line 1712:

$field = ereg_replace ("\"","\"\"",$field);

 

line 1726:

$field = ereg_replace ("\"","\"\"",$field);

 

Would you know how to change ereg to preg in these 2 lines?

 

Also, the add-ons section of the forum shows that a new version of All Customers Report was uploaded on October 8. But the latest one showing is from February of 2009. Was that your upload by any chance or some random edits by someone else?

 

Thanks,

 

Nick

Those can be replaced by

	$field = preg_replace ("/\"/","\"\"",$field);

Although the code would be more efficient with

	$field = str_replace('"','""',$field);

I don't see where are seeing an October 8th version but if there is one, it isn't one I uploaded.

Share this post


Link to post
Share on other sites

Those can be replaced by

	$field = preg_replace ("/\"/","\"\"",$field);

Although the code would be more efficient with

	$field = str_replace('"','""',$field);

I don't see where are seeing an October 8th version but if there is one, it isn't one I uploaded.

 

 

Thanks again Jack.

Share this post


Link to post
Share on other sites

Hi all,

 

New here so pardon my silly question, I have installed and the all customer report is working fine. But the look of the page alignment is all screwed up on both the all_customers.php and process page. It look something like this. Where the page is aligned all on the left navigation area.

 

 

Appreciate if someone can enlighten me on how to revert the page to a normal looking one.

 

Yasmin

Edited by jingchua

Share this post


Link to post
Share on other sites

New here so pardon my silly question, I have installed and the all customer report is working fine. But the look of the page alignment is all screwed up on both the all_customers.php and process page. It look something like this. Where the page is aligned all on the left navigation area.

 

Appreciate if someone can enlighten me on how to revert the page to a normal looking one.

Oscommerce version 2.3, which is what you are using, is a relatively new version and many contributions, including this one, have not been converted to work with it. That's why it is not displaying properly. There's nothing that can be done for it until it has been converted. That might happen tomorrow or next year. It just depends on when someone has the time or until you pay someone to do it, assuming you don't know how yourself. If you install other contributions, be sure to check if they are 2.3 compatible before doing so to avoid this problem again.

Share this post


Link to post
Share on other sites

Oscommerce version 2.3, which is what you are using, is a relatively new version and many contributions, including this one, have not been converted to work with it. That's why it is not displaying properly. There's nothing that can be done for it until it has been converted. That might happen tomorrow or next year. It just depends on when someone has the time or until you pay someone to do it, assuming you don't know how yourself. If you install other contributions, be sure to check if they are 2.3 compatible before doing so to avoid this problem again.

 

 

Hi Jack,

 

Thanks for that. I totally miss the part on compatibility. Will see if there is anything I can do to try to resolve this. :(

 

Cheers

Yasmin

Share this post


Link to post
Share on other sites

Hi there.

 

I'm converting this addon to v2.3.4 and I'm almost there. There's only one little thing left to fix:

 

PHP Notice:  Undefined variable: HTTP_POST_VARS in /home/vwshop15/public_html/loja/admin4/all_customers.php on line 26

 

This is what's in the file:

ob_start();
if (isset($_POST['csv'])) {
  if (isset($HTTP_POST_VARS['saveas'])) {  // rebound posted csv as save file
		$savename= $HTTP_POST_VARS['saveas'] . ".csv";
	}
	else $savename='unknown.csv';

  $csv_string = '';
  if ($HTTP_POST_VARS['csv']) $csv_string=$HTTP_POST_VARS['csv']; 

Can somebody help me to fix this?

 

TIA! :)
 


Patty

Share this post


Link to post
Share on other sites

Never mind. I just found the fix:

 

Just replace with $HTTP_POST_VARS with $_POST

 

Maybe this will help others.

I'll post the updated version after I test it a little bit further.

 

In time: Tks, Jack. You're fast! ;)

Edited by Patty

Patty

Share this post


Link to post
Share on other sites

ok, one more thing:

 

Fields and data with accented characters are not displaying correctly.

For instance, à will display as ã, ç will display as ç and so on.

How to fix this?

 

TIA


Patty

Share this post


Link to post
Share on other sites

I don't know it this is the best way, but it worked for me.

 

After line 34:

    header("Content-Disposition: attachment; filename=$savename");

Add:

echo "\xEF\xBB\xBF";

Patty

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

×