rotulistaz Posted February 5, 2008 Posted February 5, 2008 hi Could someone tell me how i can change the way see price. in module ( stats_products.php ) file by default appear like this: 125.0000 I want this: 125,00 I mean why always appear four zero in all price and how i eliminate two zero and chanhe ( . ) for ( , ) Thank PD sorry fo my another post reply same question :(
♥geoffreywalton Posted February 5, 2008 Posted February 5, 2008 Have you looked at the currency definition in your shop admin? Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile Virus Threat Scanner My Contributions Basic install answers. Click here for Contributions / Add Ons. UK your site. Site Move. Basic design info. For links mentioned in old answers that are no longer here follow this link Useful Threads. If this post was useful, click the Like This button over there ======>>>>>.
rotulistaz Posted February 5, 2008 Author Posted February 5, 2008 Have you looked at the currency definition in your shop admin? Yes But the problem is not in admin is in the file ( stats_products.php ) Here is stats_products.php list file: <?php 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> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFEC2"> <!-- body //--> <table border="0" width="100%" cellspacing="3" cellpadding="3"> <tr> <td></td> <!-- body_text //--> <td width="100%"> <table width="225" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="95" align="center"><input type="button" name="imprimir" value="Cerrar ventana" onClick="window.close();"></td> <td width="95" align="center"><input type="button" name="imprimir" value="Imprimir" onClick="window.print();"></td> </tr> </table> <title>Catalog_01</title><body> <center> <form name="form1" method="post" action=""> <center> <h3>Listado de Productos en la Tienda</h3> <b> <?php echo strftime(DATE_FORMAT_LONG); ?> Stock en tienda de: <?php $products_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS . " where products_status = '1'"); $products = tep_db_fetch_array($products_query); echo $products['count']; ?> productos.</b> <p> <table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr><table border="1" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="1" width="100%" cellspacing="0" cellpadding="2"> <tr> <td align="center"><b><font face="arial" font size="2"><?php echo TABLE_HEADING_PRODUCTS; ?></b></td> <td align="center"><b><font face="arial" font size="2"><?php echo TABLE_HEADING_MODEL; ?></b></td> <td align="center"><b><font face="arial" font size="2"><?php echo TABLE_HEADING_QUANTITY; ?> </b></td> <td align="center"><b><font face="arial" font size="2"><?php echo TABLE_HEADING_WEIGHT; ?> </b></td> <td align="center"><b><font face="arial" font size="2"><?php echo TABLE_HEADING_PRICE; ?> </b></td> </tr> <?php if ($HTTP_GET_VARS['page'] > 1) $rows = $HTTP_GET_VARS['page'] * 20 - 20; $products_query_raw = "select DISTINCT pd.products_name, p.products_id, p.products_model, products_price, p.products_quantity, p.products_weight from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where p.products_id = pd.products_id and p.products_id = pd.products_id and l.languages_id = pd.language_id order by pd.products_name ASC"; $products_query = tep_db_query($products_query_raw); while ($products = tep_db_fetch_array($products_query)) { $rows++; if (strlen($rows) < 2) { $rows = '0' . $rows; } ?> <tr> <td><font face="arial" font size="2"><?php echo $products['products_name']; ?></td> <td align="center"><font face="arial" font size="2"><?php echo $products['products_model']; ?></td> <td align="center"><font face="arial" font size="2"><?php echo ($products['products_quantity']); ?> </td> <td align="center"><font face="arial" font size="2"><?php echo ($products['products_weight']); ?> </td> <td align="center"><font face="arial" font size="2"><?php echo ($products['products_price']); ?> </td> <!--<td align="center"><font face="arial" font size="2"><?php echo $price = number_format ($price,2,',','.'); ($price = $products['products_price']); ?> </td>--> </tr> <?php } ?> </table> <!-- body_eof //--> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?> and here is a image result: Thanks
Recommended Posts
Archived
This topic is now archived and is closed to further replies.