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
Forum Search
Google Site Search
Author « Topic »  

Guy
ECT Moderator

Canada
2536 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
10604 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
2536 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
10604 Posts

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

include "vsadmin/inc/metainfo.php";

David

Phil
ECT Moderator

United Kingdom
7796 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
2536 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
10604 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
2536 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
1022 Posts

Pre-sales questions only
(More Details...)

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

For this line to work:

[font=Courier New][red][size=3]<?php print $metaogimage; ?>[/size=3][/red][/font=Courier New]

you must have "[red]socialmedia[/red]" in the [purple]$detailpagelayout[/purple] parameter, like this [maroon]includes.php[/maroon] entry:

[font=Courier New][purple]$detailpagelayout[/purple]="productname, navigation, productimage, dateadded, sku, reviewstarslarge, socialmedia, description, manufacturerlink, options, listprice, discounts, price, quantitypricing, quantity, addtocart, checkoutbutton, [red]socialmedia[/red], reviews, previousnext";[/font=Courier New]

And that requirement is really something I think should be changed; a topic now added to [url="https://www.ecommercetemplates.com/support/topic.asp?TOPIC_ID=113439"][blue]the Suggestion Forum here[/blue][/url]. Add a comment to support if you agree.

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

As for Facebook Images, [url="https://developers.facebook.com/docs/sharing/webmasters/images/"][blue]this Facebook Developers page here[/blue][/url] explains all you need to know about Image Sizes.

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

Regards, Gary
[img]https://itzap.com.au/pics/logo/itzap-website-design-works-mini-logo.png[/img]

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