product Code Help

There are two ways given for displaying product codes in your web pages
  1. Using JavaScript - For Beginners
  2. Using PHP - For Advanced Users who have PHP installed on their website

JavaScript Usage

Code Example:

<SCRIPT LANGUAGE=javascript src="__VROOT_DIR__/product/displayproduct.php?ano=5"> </SCRIPT>

Step 1: Copy the desired JavaScript code from __SITE_NAME__.

Step 2: Paste in the HTML file anywhere you want it to display the product(s) between the <body> tags.

Step 3: Test by displaying your HTML file in the browser.

Note

__SITE_NAME__ provides the products in a HTML Table code with width set at 100%.

This means that the table will try to occupy all of the horizontal space available to it on the web page on display.

For such an example: Click Here.



Note

For Display Purposes, you can bound the product display in to a smaller display area using normal HTML Tables.

By enclosing the script inside a custom HTML table, you can attain required display size.

Code Example:

<html>
<head>
<title>Untitled</title>
</head>
<body>
</font>
<table summary="" border=0 width=400>
<tr>
<td>
<SCRIPT LANGUAGE=javascript src="__VROOT_DIR__/product/displayproduct.php?ano=5"> </SCRIPT>
</td>
</tr>
</table>
</body>
</html>



For such an example: Click Here.


PHP Usage

For Advanced Users
Code Example:

$productURL = "__VROOT_DIR__/product/product_manger.php?d=r";
$handle = fopen($productURL,"rb");
$contents = '';
while (!feof($handle)) {
$contents .= fread($handle, 8192);
}
print $contents; //$contents holds the product contents


Step 1: Copy the desired PHP code from __SITE_NAME__.

Step 2: Paste in the PHP file anywhere.

Step 3: The variable $contents contains the HTML code generated by __SITE_NAME__.

Step 4: Use variable $contents to populate your web page.

Note

  1. Same display help can be used for PHP generated products for bounding them to HTML table.