Jump to content

(HELP) Facebook url link showing mistake


felixpixel

Recommended Posts

Dear all Prestashop Master.
I've been update my site using prestashop 1.5. everything looks fine until i try to put my homepage url inside the facebook comment.
Somehow the link refer to my facebook page rather than my site URL.
 

Could you please suggest me how to fix this issue ?

 

For example you can try to put http://ngedolapa.com or www.ngedolapa.com on your facebook status, and you can see that the link refer to my facebook page.

Thanks in advance for your help and support.

 

Regards,

Acep J

NGEDOLAPA.com

Link to comment
Share on other sites

hello

it's because of open graph tags,

you have to define them,

otherwise you will see random pictures

Hi vexia, could you please show me how to do it the proper way.

I've been trying to follow some tutor about setting OG tags, but it's not work.

i put og code before </head> tag of my folder themes header.tpl.

And the site cannot open at all.

Link to comment
Share on other sites

  • 2 weeks later...

 

Are there any possibilities to avoid the same image for every product?

 

There are, as long as you define it on the code. You can use the same code for the product pages and obtain the product image for every product (categories pages as well) but, in the case of non-image related pages (cms, new-products, best-sellers) you have to write the conditions on the code:

if page is new-products, fill the image with this particular URL

if page is bestsellers, fill the image with this particular URL

 

and so on

Link to comment
Share on other sites

There are, as long as you define it on the code. You can use the same code for the product pages and obtain the product image for every product (categories pages as well) but, in the case of non-image related pages (cms, new-products, best-sellers) you have to write the conditions on the code:

if page is new-products, fill the image with this particular URL

if page is bestsellers, fill the image with this particular URL

 

and so on

Thanks job,

I really appreciate your reply.

i am totally newbie in seo, could u please give me an example code for those.

 

Thanks in advance

Link to comment
Share on other sites

Sorry, my mistake, I thought it was there. There's a link on the ebook to the post that explains the how-to:

1- how to integrate Open Graph in Prestashop: http://bit.ly/17VfQSr

 

what I do is put this on the product page

<meta property="og:title" content="{$meta_title}" />
<meta property="og:description" content="{$meta_description}" />
{if $have_image}<meta property="og:image" content="{$link->getImageLink($product->link_rewrite, $cover.id_image, 'large_default')}" />{/if}

So "if" product has an image, the og:image tag is filled with the image URL (the default image, of course)

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

ok :)

and what about other page like categories, cms, homepage?

it's not as easy as it seems ;p it's necessary to create several if conditions etc.


btw. if variable $product will not exist, it will spawn an error probably ($product variable is not defined for example on cms pages)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...