Ecommerce software home
Shopping Cart Software Forum for Ecommerce Templates
 
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

Find us on Facebook Follow us on Twitter View our YouTube channel
Search our site
Author « Topic »  

Guy
ECT Moderator

Canada
2490 Posts

Posted - 11/13/2020 :  09:56:35  
Hi!

How can the product image can be show when sharing a link to Facebook?

There an exemple here, but I think it need some PHP programming to generate the appropriate code to link the product images.

https://developers.facebook.com/docs/sharing/webmasters/getting-started/basic-link/

----
Guy
Quebec, Canada
https://www.lineaire.com

dbdave
ECT Moderator

USA
10276 Posts

Posted - 11/13/2020 :  10:08:55  
Hi Guy, in the head of your proddetail.php page, try adding
<meta property="og:type" content="product" />
<?php print $metaogimage;?>


Then check the page source in the browser and see if you see the output
It should provide the "og" image tag with the product photo.

For .asp I have
<meta property="og:type" content="product" />
<%=metaogimage%>

David

Guy
ECT Moderator

Canada
2490 Posts

Posted - 12/01/2020 :  08:29:58  
Unfortunately, it's not working for me.

----
Guy
Quebec, Canada
https://www.lineaire.com

dbdave
ECT Moderator

USA
10276 Posts

Posted - 12/01/2020 :  08:59:33  
Above that, try adding this

include "vsadmin/inc/metainfo.php";

David

Phil
ECT Moderator

United Kingdom
7621 Posts

Posted - 12/01/2020 :  11:21:47  
Hello Guy,
Which site is it? Just send me an email



* Database Migrations and Conversions*
* ASP to PHP Cart Conversions*

*Contact Us*
*Buy The PHP Capture Card Plugin*
*Rate Our Services/View Our Feedback*

Guy
ECT Moderator

Canada
2490 Posts

Posted - 12/01/2020 :  12:59:25  
Hello Phil,

It’s for all sites.

Thanks!

----
Guy
Quebec, Canada
https://www.lineaire.com

dbdave
ECT Moderator

USA
10276 Posts

Posted - 12/01/2020 :  16:47:08  
I'm sure Phil can get you sorted Guy.
Apologies, but my earlier post of adding this include "vsadmin/inc/metainfo.php"; would actually need to be <?php include "vsadmin/inc/metainfo.php";?> I believe.

In any case, I'm sure Phil can help.

Thanks,
David

Guy
ECT Moderator

Canada
2490 Posts

Posted - 12/01/2020 :  17:29:39  
I know how Phil is capable!

Thanks David!

----
Guy
Quebec, Canada
https://www.lineaire.com

ITZAP
Ecommerce Template Guru

Australia
1010 Posts

Posted - 12/01/2020 :  19:13:14  
I will throw in one tip ...

For this line to work:

<?php print $metaogimage; ?>

you must have "socialmedia" in the $detailpagelayout parameter, like this includes.php entry:

$detailpagelayout="productname, navigation, productimage, dateadded, sku, reviewstarslarge, socialmedia, description, manufacturerlink, options, listprice, discounts, price, quantitypricing, quantity, addtocart, checkoutbutton, socialmedia, reviews, previousnext";

And that requirement is really something I think should be changed; a topic now added to the Suggestion Forum here. Add a comment to support if you agree.

In the ECT Image Manager, the $metaogimage will target the 1st GIANT image (recommended), if none then the 1st LARGE, if none then the 1st SMALL.

As for Facebook Images, this Facebook Developers page here explains all you need to know about Image Sizes.

Minimum 200 x 200 pixels.
Best 1200 x 630 pixels.

Regards, Gary

Edited by - ITZAP on 12/01/2020 19:51:12
  « Topic »  
Jump To:
Shopping Cart Software Forum for Ecommerce Templates © 2002-2022 ecommercetemplates.com
This page was generated in 0.03 seconds. Snitz Forums 2000