minddigger:
Hello mbheald, As I klick on your link I got a message :
1146 Table 'hotnbott_zc2.products' doesn't exist
in:
[select * from products where products_id ='1136']
When you have a PREFIX entered on your install of Zencart (before the tablename), you have to add the prefix as well in the query. This is not done by the original developper of the embed.php.
You also can change the code of embed.php line
$product = $db->Execute("select * from products where products_id ='" . (int)$pID . "'");
to
$product = $db->Execute("select * from ".TABLE_PRODUCTS." where products_id ='" . (int)$pID . "'");
wich also will solve this issue....
Thank you, this solved my problem. I also noticed that on both embed.php and embedjs.php you must change the website to match your url in order for your products to display correctly.
embed.php
Line 53 and 56: $image = "<img src='http://shopilm.com/images/"; should be changed to: $image = "<img src='http://YOUR_WEBSITE.com/images/";
embedjs.php
Line 57 and 60
I am now having a second problem... I tried adding the Javascript into a basic HTML site that I would like to display products on, but the code did not show anything on the website. https://www.asskickinshop.com
Here is how I implemented the code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>###### Kickin Shop - hotnbottled.com</title>
</head>
<body>
<script language="JavaScript"
src="http://www.hotnbottled.com/embed.php?products_id=1136"
type="text/javascript"></script>
</body>
</html>
Matthew Heald
All Hot N' Bottled - Retail
http://hotnbottled.com
Hot Shots Hot Sauce - Wholesale
http://hotshotshotsauce.com