If this is your first visit, check our documentation. To post, register or login.
Forums / Community Contributed Add-Ons / Addon Admin Tools / Facebook Open Graph blows up -- and wrong image

Facebook Open Graph blows up -- and wrong image

Started by helenewallis on 23 Oct 2020, 8:53 PM · Views: 1,843

Results 1 to 3 of 3
23 Oct 2020, 8:53 PM
#1
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Post #1 by helenewallis

I've just installed the Facebook OpenGraph plug-in from this forum, and it blows up on getting the image. I went back to the original code for it and found that the line

$myImage= zen_get_products_medium_image((int)$_GET['products_id']);

works if I change it back to the original variable name, which was zen_get_products_image

So it's working. But the image it displays is the original larger one for the product, not the zencart thumbnail. I've gone as far with this as I have time for right now. Does anyone know if there is a way to use the zencart thumbnail instead? I think I could take care of the problem by substituting the actual thumbnails for the uploaded product images, or by manually resizing all the images. But that would take hours that I don't have.

24 Oct 2020, 12:26 AM
#2
helenewallis avatar

helenewallis

Totally Zenned

Join Date:
Jun 2016
Location:
Suffolk VA
Posts:
625
Plugin Contributions:
0

Post #2 by helenewallis

Okay, I made this work by adding the function code from Gopinath Goswami to functions_lookups.php, where he originally had it, not to a separate functions file, as the plugin provides. It still isn't displaying the smaller images I want and it isn't always displaying the correct image for the product it's linked to. But that's a separate problem that will have to be dealt with later.

24 Oct 2020, 8:47 PM
#3
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Post #3 by mc12345678

What does it mean that it "blows up"? What helpful information is given in the myDebug logs? Considering that I don't see the function zen_get_products_medium_image in the files, I would think that it calls the zen_get_products_image but uses the size appropriate for the medium image instead of the default for the small image... I could be wrong... seems that the constants to use for that size is: MEDIUM_IMAGE_WIDTH and MEDIUM_IMAGE_HEIGHT in that order after the products_id to request the image(s) of that size. Display of other images probably depends on plugins and other modifications that have been made or need to be made.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...