Skip to main content

Social Plugin Facebook Share Desription

More
11 years 6 months ago #198988 by Hoar
-- Joomla version -- : 2.5
-- PHP version -- : 5
-- Browser(s) name and version -- : Trust Deal

Hi,

is it possible to change the Facebook Share Description, it retrives the product description, iwould like it to retrive the Meta Description in the Product.

Thank you

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #198989 by Jerome
Hi,

It requires to modify the plugin itself ; so it is possible but it's not recommended if you want to update HikaShop afterwards (because you will lost your modification with the update).

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199309 by Hoar
I Have no plan to update, so can you tell me where i can do the changes in the plugin please.

Thank you

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199311 by Xavier
Hi,

So you have to edit the file "plugins/system/hikashopsocial/hikashopsocial.php" in the function "_addFacebookButton()" replace:
Code:
$this->meta['property="og:description"'] = '<meta property="og:description" content="'.htmlspecialchars(strip_tags($element->description), ENT_COMPAT,'UTF-8').'"/> ';
By:
Code:
$this->meta['property="og:description"'] = '<meta property="og:description" content="'.htmlspecialchars(strip_tags($element->product_meta_description), ENT_COMPAT,'UTF-8').'"/> ';

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199413 by Hoar
Hi,
Thank you for the info.
i did what written before but no luck, everytime i press the share button it keeps retrieving the product description.

thank you

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199414 by Hoar
i have attached the file so you can see if i have done it correctly.

thank you

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199427 by Xavier
Hi,

My bad, wrong modification, please revert back the code to:
Code:
$this->meta['property="og:description"'] = '<meta property="og:description" content="'.htmlspecialchars(strip_tags($element->description), ENT_COMPAT,'UTF-8').'"/> ';
And then in the function "_getElementInfo()" replace:
Code:
$ret->description = $element->product_description;
By:
Code:
$ret->description = $element->product_meta_description;

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199561 by Hoar
Hi,

i have done the changes and i cannot see the Meta description.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #199569 by Xavier
Hi,

The previous code must work, but as I remember Facebook has a kind of cache, so the changes may take time to appear correctly. I will have a deeper look at the Facebook API.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #200248 by Hoar
Hi,

the changes still haven't been done.

thank you

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #200284 by Xavier
Hi,

So if the changes has no effect, please try to disable the plugin and see if you still have the meta tag in the page content.
If it is, so it come from another plugin/component, that don't come from HikaShop.

Please Log in or Create an account to join the conversation.

More
11 years 6 months ago #200354 by Hoar
Hi,

I did what you written but no luck, I noticed in the plugin there are 2 hikashop social network plug, I enabled the system but nothing happens, I disable the content plugin and the social network goes away. I have attached an image so you can see.

thank you

Please Log in or Create an account to join the conversation.

More
11 years 5 months ago #200360 by Xavier
Hi,

Please disable the content plugin, and enable the system one with the indicated code changes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.157 seconds
Powered by Kunena Forum