Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add images on product info


juanmanuel

Recommended Posts

Look really hard at the code to discern where your info would change.

 

Make up a number (#) for the product's id, one that hasn't been taken.

 

 

Take that same number

Add a row to the table products

All you have to add here is the # into the products_id field.

Then add the sub-path to your image in the products_image field.

 

Take that same number again

Add a row to the table products_description

Now just add # to the products_id field.

 

DONE WITH DATABASE STUFFS.

 

 

For multiples, I had to add this to the header of product_info.php, in addition to and underneath their javaScript because their popupImageWindow doesn't allow for more then one instance.

<script language="JavaScript"> <!--

function openNewWindow(URLtoOpen, windowName, windowFeatures) { newWindow=window.open(URLtoOpen, windowName, windowFeatures); }

//-->

</script>

 

Then in the product description, this is how I formatted it.

Use that number(#) at the end of the links below where it says pID=#

NOTICE THAT THE FIRST LINK IS IN THE SAME FORMAT AS THEIR LINKS. Can handle two instances, I guess. Change the caps LINK and TITLE to your own, as well as the other info, like the location to make the thumbnail and the actual words displayed on the page.

 

 

Blerb about product, blah blah.<br><br>





<table cellpadding=0 cellspacing=0 border=0>

<tr>

<td>

<font size=1>

<a href="javascript:popupImageWindow('http://LINK/popup_image.php?pID=3')"><img src="images/logo/card_2_a.jpg" border="0" alt=" TITLE " width="80" height="100" hspace="5" vspace="5"><br>Card 2</a>

</font>

</td>



<td>

<font size=1>

<a href="javascript:openNewWindow('http://LINK/popup_image.php?pID=4','thewin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')">

<img src="images/logo/card_3_a.jpg" border="0" alt="TITLE " width="80" height="100" hspace="5" vspace="5"><br>Card 3</a>

</font>

</td>



<td>

<font size=1>

<a href="javascript:openNewWindow('http://LINK/popup_image.php?pID=5','thewin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')">

<img src="images/logo/card_4_a.jpg" border="0" alt="TITLE" width="80" height="100" hspace="5" vspace="5"><br>Card 4</a>

</font>

</td>



<td>

<font size=1>

<a href="javascript:openNewWindow('http://LINK/popup_image.php?pID=6','thewin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')">

<img src="images/logo/card_5_a.jpg" border="0" alt="TITLE" width="80" height="100" hspace="5" vspace="5"><br>Card 5</a>

</font>

</td>





<td>

<font size=1>

<a href="javascript:openNewWindow('http://LINK/popup_image.php?pID=7','thewin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')">

<img src="images/logo/card_6_a.jpg" border="0" alt="TITLE " width="80" height="100" hspace="5" vspace="5"><br>Card 6</a>

</font>

</td>





<td>

<font size=1>

<a href="javascript:openNewWindow('http://LINK/popup_image.php?pID=8','thewin','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizab
le=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=1
50')">

<img src="images/logo/card_7_a.jpg" border="0" alt="TITLE" width="80" height="100" hspace="5" vspace="5"><br>Card 7</a>

</font>

</td>



</tr>

</table>

 

:D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...