Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

PHP table errors...I am lost


Recommended Posts

Hello all,


I am still somewhat of a newbie to all of this so please bear with me, but you have all done a terrific job of helping me in the past.


The problem this time is that I have an OS commerce catalog set up that seems to be working fine (properly displaying all photos and no dead links), but this catalog also links the the main page where users come on to the site and it is here that users also see a new product table that links to the catalog and uses pictures from the catalog to display on the main page. The problem is in this new products table on the new page. If I do a view source of the main page, I notice that the PHP is generating a table with the photos as planned, but it continues to add photos on to the same row and never creates a break. For this reason, I am able to get the first 4 product images to fit scrunched together, but the rest just run off the side of the page and are invisible to users. Being that I do not know the PHP coding all that well, I have no clue where to begin with this issue.


I think I have found the page in my admin files that controls this table, but I do not see where in the code the actual reference to the table is made. Also, the catalog is perfectly fine and automatically displays the products in evenly distributed rows. Below is the coding of the view source from the main page with the row in question highlighted and then I am also showing the file I believe to be the php that is generating this page. If anyone can tell me what to change I would appreciate it.



main page table source




<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">


<td colspan="4" valign="top"><hr><img src="images/new_products.jpg" alt="" width="200" height="40" border="0"><br><br></td>


<tr><td align="center"><a href="catalog/product_info.php?products_id=1000345"><img src="catalog/images/gardenerswhite.gif" alt="" border="0"><br><br>Gardener's White</a><br>$9</td><td align="center"><a href="catalog/product_info.php?products_id=1000346"><img src="catalog/images/falconersred.gif" alt="" border="0"><br><br>Falconer's Red</a><br>$9</td><td align="center"><a href="catalog/product_info.php?products_id=1000347"><img src="catalog/images/cooperswhite.gif" alt="" border="0"><br><br>Cooper's White</a><br>$9</td><td align="center"><a href="catalog/product_info.php?products_id=1000348"><img src="catalog/images/cobblerswhite.gif" alt="" border="0"><br><br>Cobbler's White</a><br>$9</td></tr>



The last image in this sequence, Cobbler's white, is currently off the side of the page....



Here is what I believe to be the php






//nacitanie vseobecnych tried, fukncii a cfg

require "inc/config.php";

require "classes/class.FastTemplate.php";

require "classes/class.MySQL.php";

require "functions/functions_main.php";


//nacitanie unikatnych funkcii pre danu stranku

require "functions/functions_index.php";

require "functions/functions_counter.php";

require "functions/functions_activate.php";

require "functions/functions_image.php";

require "functions/functions_news.php";


//pripojenie na databazu


$mysql = new MySQL($db_host,$db_name,$db_user,$db_pass);






//vytvorenie noveho templ. objektu

$tpl = new FastTemplate("templates");


//definovanie beznych sablon

$tpl->define(array( main => "block_all_main.tpl", head=> "block_head_skript.tpl"));


//definovanie unikatnych sablon pre stranku

$tpl->define(array( stred => "block_index_stred.tpl", vpravo

=> "block_index_vpravo.tpl",

submenu=> "table_index_submenu.tpl",

spectable=> "table_index_specials.tpl",

upcoming => "table_index_upcoming.tpl",

specials => "row_specials_special.tpl",

ozrow => "row_all_oznam.tpl"));


//nacitanie stalych casti stranky




//nacitanie unikatnych casti stranky

$page = 1;

$plimit = 12;









//zosrotovanie unikatneho obsahu stranky




//zosrotovanie finalnej stranky



//vypis stranky





This is the file called index.php, which as far as I can tell is the correct choice.




Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...