david Posted October 29, 2002 Share Posted October 29, 2002 Hi Is it possible to change the 01, 02 etc. to just 1, 2 in the best sellers box? Also, how does one indent the second line when the length of the best seller is forced onto a second line. thx david Link to comment Share on other sites More sharing options...
david Posted October 29, 2002 Author Share Posted October 29, 2002 7 views but no replies :-( can anyone point me in the right direction??? thanks Link to comment Share on other sites More sharing options...
Ajeh Posted October 29, 2002 Share Posted October 29, 2002 If you look at the code in /includes/boxes/best_sellers.php it is the format used: while ($best_sellers = tep_db_fetch_array($best_sellers_query)) { $rows++; $info_box_contents[] = array('align' => 'left', 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); } Take away the format, which is defined in /includes/functions/general.php and you should get the numbers without the leading 0 on them. Don't remove the function itself from general.php as that is used elsewhere, but remove the use of it in best_sellers.php Link to comment Share on other sites More sharing options...
david Posted October 30, 2002 Author Share Posted October 30, 2002 Thanks Linda... looks complicated but I will give it a try! Any idea about the indenting issue? An example of what I ideally want to achieve is at : http://www.framtidshuset.no/catalog/ You notice how the best sellers are all indented and line up nicely. Many thanks again David Link to comment Share on other sites More sharing options...
Ajeh Posted October 30, 2002 Share Posted October 30, 2002 You could do this with tables. Look at how /includes/boxes/best_sellers.php is built. Put the number in a <td>##</td><td>product name</td> You are mainly editing this line: 'text' => tep_row_number_format($rows) . '. <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); You do not want the tep_row_number_format($rows) as that is giving you the 01, 02, 03 ... you just want $rows To utilize the indented look ... via <td> settings. Change it to: 'text' => $rows . '.' . '</td><td align="left" valign="top" class="boxText">' . '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $best_sellers['products_id'], 'NONSSL') . '">' . $best_sellers['products_name'] . '</a>'); This should give you the look you want. Link to comment Share on other sites More sharing options...
david Posted October 31, 2002 Author Share Posted October 31, 2002 Great! Thanks Linda... I really do appreciate your help - you have a great way of explaining stuff to PHP newbies. Thanks again. David Link to comment Share on other sites More sharing options...
Ajeh Posted October 31, 2002 Share Posted October 31, 2002 You are more than welcome. Glad it worked for you :D Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.