rahhbert Posted August 2, 2011 Posted August 2, 2011 Hello, I am new to OSCommerce and I'm trying to find out how to input the URL of the product's image in product_info.php. It is for the Facebook like/recommend button to display the correct image on Facebook. To display the correct image, you must use <meta property="og:image" content="<your image link>"/>. If anyone could help, I would really appreciate it.
satish Posted August 2, 2011 Posted August 2, 2011 tep_href_link(DIR_WS_IMAGES . $pi['image']); this code will do. Satish Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site. Check My About US For who am I and what My company does.
rahhbert Posted August 2, 2011 Author Posted August 2, 2011 tep_href_link(DIR_WS_IMAGES . $pi['image']); this code will do. Satish Thank you for that information. :thumbsup: The only problem is that the code does not work when placed in the header. In the body, it shows the product's image URL, but in the header it just shows <meta property="og:image" content="http://MYDOMAIN.com/images/" /> This is the code I used as you suggested (I think I did it right): <meta property="og:image" content="<?php echo tep_href_link(DIR_WS_IMAGES . $pi['image']); ?>" /> Do you have any idea as to why the product's image URL would show in the body but not the header? Thanks!!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.