xtracool:
Further to my post, I have been able to find how to change the code in embedjs.php ( from the Embed Products onto 3rd Party Site module) to pull info from the products database.
Line23 $line[] = sprintf("%.2f",$product->fields['products_price']);
Can be changed to
Line23 $line[] = sprintf("%.2f",$product->fields['products_weight']);
and It retreives the product weight ok
but when I change Line 23 to
$line[] = sprintf("%.2f",$product->fields['specials_price']);
it does not retrieve the special price from the products cataloge.
I would appreciate it if someone can confirm for me the database field name for the product special price (if I don't have it right).
Also would appreciate some code to display the special price if one is available , and not display if a special price is not available
Thanks in advance
Alan
I'm getting there....... But I still need some assistance please
I have managed to display the special price (see http://www.xtracool.com.au/TestEmbed) by creating through trial and error (I know nothing about javascript) an additional PHP file (embedjsss.php) with the following code
<body>
$pID = zen_db_prepare_input($_REQUEST['products_id']);
$special = $db->Execute("select * from specials where products_id ='" . (int)$pID . "'");
while (!$special->EOF){
if ($special['status'] !== "1"){
$line[] = "Special Price: $";
$line[] = sprintf("%.2f",$special->fields['specials_new_products_price']);
}
{
$line[] = "<br />Available Until $";
$line[] = sprintf("%.2f",$special->fields['expires_date']);
}
break;
}
foreach ($line as $print){
print "document.write('";
print $print;
print "');\n";
}
</body>
Now I need to change the following - and would appreciate some help please - I have spent hours googling javascript but have not found the answers
1/ Display the Available Until Date as dd/mm/yyyy
2/ provide a line break after the image so that the price is on the next line
3/ get rid of the space between the buy now button and the following line
4/ some code to strikeout the normal price (with a line through it) f there is a special price
5/ change the color of the special price to red
And then I think I'm done.
Thanks in advance
Alan
Xtracool