Dynadot — .com Registration $8.99

Item Discriptions not showing up

Spaceship Spaceship
Watch

food_consult

Established Member
Impact
5
I need some help! The item disctiptions are not showing up on my cart?!! :'(
http://www.hoopnutsncandies.com/index.php?case=category&CID=7

here is the code:

PHP:
<?php
	        
			/* Query to fetch last four featured products */
			if(!isset($_REQUEST["start"]))
			{ 
				$start = 0; // This variable is set to zero for the first page
			}else{
				$start = $_REQUEST["start"];
			}
			
				$catId = $_REQUEST['CID'];
				$page_name ="index.php?case=category&CID=".$catId."&start";
				$eu = ($start - 0);
				$limit = 12; // No of records to be shown per page.
				$back = $eu - $limit;
				$next = $eu + $limit;
				
				$SQL1= "SELECT * FROM tbl_product WHERE SubCategoryID = '". $catId."'  AND Status= 'Y'";
				$rsQuery1 = mysql_query($SQL1);
				$num=mysql_num_rows($rsQuery1);
				
				$SQL= "SELECT * FROM tbl_product WHERE SubCategoryID = '". $catId."'  AND Status= 'Y' limit $eu, $limit ";
				$rsQuery = mysql_query($SQL);
			
			if(isset($_SESSION["noRefresh"]))
			{
 	            $_SESSION["noRefresh"]="";
	        }
			
	
	?>	
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="542" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td align="center"><table width="95%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                              <td> </td>
                              <td> </td>
                            </tr>
                            <tr>
                              
                            </tr>
                            <tr>
                              <td width="19%"> </td>
                              <td width="81%" align="left" valign="top"><img src="images/mid_bgline.gif" width="225" height="2" /></td>
                            </tr>
                          </table></td>
                        </tr>
                        <tr>
                          <td align="center" valign="top">
						  <?php if($num>0){?>
						  <table width="95%" border="0" cellspacing="0" cellpadding="0">
                              <tr>
                                <!-- indivisual featured items -->
								<?php 
								$i = 1;
								while($row = mysql_fetch_array($rsQuery)){
								
								?>
								<td width="45%" valign="top">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
                                  <tr>
                                    <td width="7"><img src="images/midleft_cor.gif" width="7" height="34" /></td>
                                    <td align="center" background="images/mid_bg_mid.gif" class="txtbold1"><?=$row['ProductName'];?></td>
                                    <td width="7"><img src="images/midright_cor.gif" width="7" height="34" /></td>
                                  </tr>
                                  <tr>
								 <form action="index.php?case=shopping" method="POST" >
                                    <td background="images/mid_bgline1.gif" style="background-repeat:no-repeat;"> </td>
                                    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                      <tr>
                                        <td width="45%" rowspan="3">
										<img src="ProductImage/<?=$row['ProductImg'];?>" width="80" height="60" vspace="2" /></td>
                                        <td width="55%"> </td>
                                      </tr>
                                      <tr>
                                        <td align="left" class="linktop2">Price : $<?=$row['ProductPrice'] ;?>
                                          </td>
                                      </tr>
                                      <tr>
                                        <td align="left" valign="top">
										<input name="Submit" type="submit" class="bttn" value="Add to Cart" /></td>
										<input name="product_id" type="hidden"  value="<?=$row['ProductID'];?>" />
										<input name="quantity" type="hidden"  value="1" />
                                      </tr>
                                    </table></td>
                                    <td background="images/mid_bgline2.gif" style="background-repeat:no-repeat;"> </td>
								</form>
                                  </tr>
                                </table></td>
                                 
								 <?php if($i%2 == 0) { 
								          echo "</tr><tr>";
								    }else{
									  echo "<td width=\"5%\"> </td>";
									
									}
									$i++;
								 ?>
								         
								<?php 
								   
								} ?>
								<!-- indivisula item ends here -->
                              
                          </table>
						  <?php }else{ echo '<font color="#FF0000" >! Products Not Exits</font>';}?>
						  </td>
                        </tr>
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Where is it suppose to show up? It looks fine to me.

- Steve
 
0
•••
It could just be me. But i see no code for Product Description

I'm assuming you want some words above the price too.

But in reality i agree with the other poster it looks good.
 
0
•••
Each Item is supposed to have a Description! The text shows up in the db and it is stored properly, But I think I am missing the right php code to call it up on the website.

Should Be Picture, Text , Price, add to cart button

Thanks Guys!
 
0
•••
--------------------
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="7"><img src="images/midleft_cor.gif" width="7" height="34" /></td>
<td align="center" background="images/mid_bg_mid.gif" class="txtbold1"><?=$row['ProductName'];?></td>
<td width="7"><img src="images/midright_cor.gif" width="7" height="34" /></td>
</tr>
<tr>
<form action="index.php?case=shopping" method="POST" >
<td background="images/mid_bgline1.gif" style="background-repeat:no-repeat;"> </td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="45%" rowspan="3">
<img src="ProductImage/<?=$row['ProductImg'];?>" width="80" height="60" vspace="2" /></td>
<td width="55%"> </td>
</tr>
<tr>
<td align="left" class="linktop2">Price : $<?=$row['ProductPrice'] ;?>
</td>
</tr>
<tr>
<td align="left" valign="top">
<input name="Submit" type="submit" class="bttn" value="Add to Cart" /></td>
<input name="product_id" type="hidden" value="<?=$row['ProductID'];?>" />
<input name="quantity" type="hidden" value="1" />
</tr>
</table></
----------------------------------------------

Start here. You list everything but Product Description.

I would add description above price.. See what happens.

Im assuming you have Product name stored similiar to Product description in the database.

So I would copy that table change it to see if description shows up. then you will be able to code it above the price/add to cart item
 
Last edited:
0
•••
Appraise.net

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back