Hello
The following example is valid for generating links related to open graph and most plugins generate links in this way.
<meta property="og:title" content="How to Become an SEO Expert (8 Steps)" />
<meta property="og:description" content="Get from SEO newbie to SEO pro in 8 simple steps." />
<meta property="og:image" content="https://ahrefs.com/blog/wp-content/uploads/2019/12/fb-how-to-become-an-seo-expert.png" />
but I installed the joomshopping plugin, it produces links as follows
<meta property="og:title" content="How to Become an SEO Expert (8 Steps)">
<meta property="og:description" content="Get from SEO newbie to SEO pro in 8 simple steps.">
<meta property="og:image" content="https://ahrefs.com/blog/wp-content/uploads/2019/12/fb-how-to-become-an-seo-expert.png /">
it doesn't add the content end " />
For example, the end of the url ends like this /" >
content ends like this " >
i think there seems to be a problem adding CustomTag i am using latest version Open graph 2.0.2
//product
function onBeforeDisplayProductView(&$view) {
$link = \JURI::getInstance();
$lang = \JSFactory::getLang();
$doc = \JFactory::getDocument();
$jshopConfig = \JFactory::getConfig();
$locale = $lang->lang;
$type = 'product';
$url = $link->getScheme() ."://" . $link->getHost() . $link->getPath()."/". $link->getQuery();
$image = $link->getScheme() ."://" . $link->getHost()."/components/com_jshopping/files/img_products/".$view->product->image;
$site_name = $jshopConfig->get( 'sitename' );
$doc->addCustomTag( '<meta property="og:locale" content="'.$locale.'" />' );
$doc->addCustomTag( '<meta property="og:title" content="'.$view->product->name.'" />' );
$doc->addCustomTag( '<meta property="og:type" content="'.$type.'" />' );
$doc->addCustomTag( '<meta property="og:url" content="'.$url.'"/>' );
$doc->addCustomTag( '<meta property="og:image" content="'.$image.'" />' );
$doc->addCustomTag( '<meta property="og:site_name" content="'.$site_name.'" />' );
}
Joomla: 4.3.0
JoomShopping: 5.1.3
PHP: 7.4
JoomShopping: 5.1.3
PHP: 7.4