Jump to content

[SOLVED] Pinterest not picking up product image


Recommended Posts

Hi, I have the latest Prestashop version and I have the social networking buttons on the product page.  When I click the pinterest one, however, it fails to pick up the product image.  It just shows a broken image type of thing.  Is there a fix for this, please? 

post-780861-0-91488500-1397699837_thumb.jpg

Link to comment
Share on other sites

Actually, I am not sure if it is on localhost.  It is just a mySQL setting.  How would I know? 

localhost website is located on your PC,

if website is "live" it must be stored on remote hosting account

 
 

 

 

The site is live and being hosted online, so it should be able to pick up the image.  Is this what you mean?

 

share url to your shop please

Link to comment
Share on other sites

hello

sorry i just missed your replies

 

in this case it's necessary to define media tag in url to pinterest page.

 

open file: http://beddingforbunks.com/modules/socialsharing/js/socialsharing.js

 

and change socialsharing_pinterest_click(message) function to:

function socialsharing_pinterest_click(message)
{
	window.open('http://pinterest.com/pin/create/button/?media='+$('#bigpic').attr('src')+'&url=' + location.href, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
}

result:
FT1fVZi.png

  • Like 3
Link to comment
Share on other sites

Oh, wait.. I must have upgraded the module and it reverted to the original.  Is there a way to avoid this?  Thanks!

 

yes, store module files in your theme directory (your theme directory must use different name, for example instead of default-bootstrap use default-theme)

Link to comment
Share on other sites

hello

sorry i just missed your replies

 

in this case it's necessary to define media tag in url to pinterest page.

 

open file: http://beddingforbunks.com/modules/socialsharing/js/socialsharing.js

 

and change socialsharing_pinterest_click(message) function to:

function socialsharing_pinterest_click(message)
{
	window.open('http://pinterest.com/pin/create/button/?media='+$('#bigpic').attr('src')+'&url=' + location.href, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
}

result:

FT1fVZi.png

Thank you oh so very much for this simple fix. Got me squared away quickly =-)

Link to comment
Share on other sites

  • 4 weeks later...

Hello. I downloaded the file and I socialsharing.js installed on local server, it works perfectly. but the combination is the url that comes by default, attachment, however in the online server, I have another configuration url not working, image attached file, thanks greetings.

 

local server works perfectly    post-158433-0-25034100-1401697081_thumb.jpg

 

web server configuration url, not work   post-158433-0-21988200-1401697135_thumb.jpg 

Link to comment
Share on other sites

The code below will also add the product title to the Pinterest description field.

function socialsharing_pinterest_click(message)
{
	window.open('http://pinterest.com/pin/create/button/?media='+$('#bigpic').attr('src')+'&description='+(encodeURIComponent(document.title))+'&url=' + location.href, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
}
Link to comment
Share on other sites

  • 5 months later...

 

The code below will also add the product title to the Pinterest description field.

function socialsharing_pinterest_click(message)
{
	window.open('http://pinterest.com/pin/create/button/?media='+$('#bigpic').attr('src')+'&description='+(encodeURIComponent(document.title))+'&url=' + location.href, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
}
I'm also with this problem of the image does not appear. I made this change in the file but it didn't work.
post-13746-0-49014100-1416492338_thumb.png
 
My original file is very different than v. shows. Seeing as he is:
 
$(document).ready(function(){
$('button.social-sharing').on('click', function(){
type = $(this).attr('data-type');
if (type.length)
{
switch(type)
{
case 'twitter':
window.open('https://twitter.com/intent/tweet?text=' + sharing_name + ' ' + encodeURIComponent(sharing_url), 'sharertwt', 'toolbar=0,status=0,width=640,height=445');
break;
case 'facebook':
window.open('http://www.facebook.com/sharer.php?u=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'google-plus':
window.open('https://plus.google.com/share?url=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'pinterest':
window.open('http://www.pinterest.com/pin/create/button/?media=' + sharing_img + '&url=' + sharing_url, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
break;
                        }
}
});
});
 
When I made the change all buttons stopped working.
Any other suggestions?
 
Edited by roberta (see edit history)
Link to comment
Share on other sites

 

I'm also with this problem of the image does not appear. I made this change in the file but it didn't work.
 
My original file is very different than v. shows. Seeing as he is:
 
$(document).ready(function(){
$('button.social-sharing').on('click', function(){
type = $(this).attr('data-type');
if (type.length)
{
switch(type)
{
case 'twitter':
window.open('https://twitter.com/intent/tweet?text=' + sharing_name + ' ' + encodeURIComponent(sharing_url), 'sharertwt', 'toolbar=0,status=0,width=640,height=445');
break;
case 'facebook':
window.open('http://www.facebook.com/sharer.php?u=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'google-plus':
window.open('https://plus.google.com/share?url=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'pinterest':
window.open('http://www.pinterest.com/pin/create/button/?media=' + sharing_img + '&url=' + sharing_url, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
break;
                        }
}
});
});
 
When I made the change all buttons stopped working.
Any other suggestions?
 

 

 

 

please share url to shop

cases like that need a little deepest inspection

Link to comment
Share on other sites

  • 5 weeks later...
  • 5 months later...

Hi Vekia,

 

 

 

Facebook is not picking up the product link. All social share buttons are working fine except Facebook, It displays the error "Your Link Could not be found".

I am using Social Sharing Ver 1.3.0 (PS.1.6.14).  store - www.galsvilla.com .  I tried all the suggestions after going through the forum but problem persists. Kindly suggest.

 

This is the socialsharing.js part :

 

case 'facebook':
                    window.open('http://www.facebook.com/sharer.php?u=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
                    break;

post-984488-0-50246400-1434655988_thumb.jpg

Edited by galsvilla (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Help! The fixes here fixed the pinterest problem back in 2014 but stupid me updated the module and now it doesn't work again. I tried both code fixes listed in this feed but neither worked even though they worked a few years ago for me. Any help would be greatly appreciated. My website is luckyskunks.com. Here's the code I have now:

$(document).ready(function(){
$('button.social-sharing').on('click', function(){
type = $(this).attr('data-type');
if (type.length)
{
switch(type)
{
case 'twitter':
window.open('https://twitter.com/intent/tweet?text=' + sharing_name + ' ' + encodeURIComponent(sharing_url), 'sharertwt', 'toolbar=0,status=0,width=640,height=445');
break;
case 'facebook':
window.open('http://www.facebook.com/sharer.php?u=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'google-plus':
window.open('https://plus.google.com/share?url=' + sharing_url, 'sharer', 'toolbar=0,status=0,width=660,height=445');
break;
case 'pinterest':
 
 
var img_url = sharing_img;
if (typeof $("#bigpic").attr('src') != 'undefined' && $("#bigpic").attr('src') != '') {
img_url = $("#bigpic").attr('src');
}
 
window.open('http://www.pinterest.com/pin/create/button/?media=' + img_url + '&url=' + sharing_url, 'sharerpinterest', 'toolbar=0,status=0,width=660,height=445');
 
 
 
break;
Link to comment
Share on other sites

×
×
  • Create New...