If this is your first visit, check our documentation. To post, register or login.
Forums / Configuring the Zen Cart Admin / Basic Configuration / help solution image handler with facebook?

help solution image handler with facebook?

Started by onlysteg on 26 Jan 2013, 11:20 PM · Views: 1,483

Results 1 to 11 of 11
26 Jan 2013, 11:20 PM
#1
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #1 by onlysteg

hello guys, I'm going crazy to set the preview on facebbok, I can not find the image file that is directori nalla product page, you know help me?
I modified the file tpl_product_info_display.php in line with eof Product description "<link rel =" image_src "href =" <? Php echo "<link rel="image_src" href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . "/" . bmz_cache . "/" ?><?php echo... file image...; ?>" />" can you tell me what to put in (file image)? Thank you very much,
greetings. : Smile:: Smile:: Smile:

26 Jan 2013, 11:33 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

Don't use bmz cache just link to your /image/image_name.xxx

Zen-Venom Get Bitten

26 Jan 2013, 11:46 PM
#3
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #3 by onlysteg

the problem is that I do not know the link .... because I want to I get the image of the product, but taken from bmz_cache, not "product_image" ... can you tell me how?

27 Jan 2013, 12:25 AM
#4
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #4 by lhungil

onlysteg:

the problem is that I do not know the link .... because I want to I get the image of the product, but taken from bmz_cache, not "product_image" ... can you tell me how?
Are you still trying to solve Facebook cannot find my image?

In the product templates $products_image usually contains the entire path to the image (minus the http/https and domain name). Not sure if that helps at all as Facebook expects the og:image tag to be in the html header usually. Although you could probably change the image generation in tpl_modules_main_product.php to be absolute instead of relative (using HTTP_SERVER/HTTPS_SERVER + DIR_WS_CATALOG/DIR_WS_HTTPS_CATALOG + $products_image). This way Facebook would be able to automatically find the image... even though they still prefer you to set it using the meta tag.

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

27 Jan 2013, 9:59 AM
#5
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #5 by onlysteg

then the problem is that the image of (product_image) is the one that fits me in mysite / images / ... I want I want to take that in bmz_cache so it displays the preview makes me want to view other images ... I tried to do as you say but it does not work .. : (: (

27 Jan 2013, 12:29 PM
#6
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #6 by onlysteg

this is the file tpl_modules_main_product_image: ```php

<?php /** * Module Template * * @package templateSystem * @copyright Copyright 2003-2005 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * @version $Id: tpl_modules_main_product_image.php 3208 2006-03-19 16:48:57Z birdbrain $ */ ?> <?php require(DIR_WS_MODULES . zen_get_module_directory(FILENAME_MAIN_PRODUCT_IMAGE)); ?> <div id="productMainImage" class="centeredContent back"> <span class="image"><a href="<?php echo $products_image_large; ?>"><?php echo zen_image($products_image_medium, addslashes($products_name), MEDIUM_IMAGE_WIDTH, MEDIUM_IMAGE_HEIGHT); ?><span class="zoom"></span></a></span> <?php /* <a href="<?php echo $products_image_large; ?>"><?php echo TEXT_CLICK_TO_ENLARGE; ?></span></a> */?> </div> ```
27 Jan 2013, 5:30 PM
#7
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #7 by lhungil

So you want to grab the src for the small thumbnail image generated by Image Handler?

I've not worked a ton with Image Handler, so will probably not be much help.... But based on the code in html_output.php I'd look to see how the function "handle_image" works and also look into any observers for "NOTIFY_HANDLE_IMAGE". I'm guessing one of those two will give you a good idea of how to capture the image src for the images generated by Image Handler...

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

27 Jan 2013, 8:42 PM
#8
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #8 by onlysteg

i have try at edit in: ```php

<?php } ?> <!--eof Product description --> <link rel="image_src" href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . "/" . bmz_cache . "/" ?><?php echo NOTIFY_HANDLE_IMAGE; ?>" /> ``` but not work... :( :(
28 Jan 2013, 1:11 PM
#9
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #9 by onlysteg

if i write: ```php

<link rel="image_src" href="<?php echo "http://" . $_SERVER['HTTP_HOST'] . "/" . bmz_cache . "/" ?><?php echo . NOTIFY_HANDLE_IMAGE; ?>" /> ``` the result is :"url": "http://www.disotech.it/car_audio/autoradio/bmz_cache/7/7cc57bef8d3d2bbec1892d26988bfff3.image.190x106.jpg", but it is wrong because I have to avoid: "/car_audio/autoradio" how do I? :(:(
31 Jan 2013, 6:56 PM
#11
onlysteg avatar

onlysteg

New Zenner

Join Date:
Dec 2012
Posts:
16
Plugin Contributions:
0

Post #11 by onlysteg

why do not you answer me more? no one can help me? : (: (