Good day
Im using your supermart template and it is great with this plugin ...
How can i force when on the product detail page to use the description of the product instead of the website ...
something like this ... $og_desc = $this->product->product_s_desc;
Thanks
Virtuemart Desc product instead of website
Good Day
In witch file are located the og tag ... ie property="og:title etc...
I want to test some stuff
Stefan
In witch file are located the og tag ... ie property="og:title etc...
I want to test some stuff
Stefan
Last edit: Tue Dec 17, 2013 7:45 pm by encreplus
The topic has been closed.
I do not think this is a good idea. You can always enter your custom meta description in the meta description field in your products which will also be used for og meta description. Now if you change the og meta description and defers from your actual page meta description then your site should get penalized by search engine crawler because of conflicts. Apart from that Product Short Description field can also has html content and in that case this method will completely break your site.
Anyway, you can always change it in plugins\system\vmogmetatag\vmogmetatag.php
Find the following codes between lines 93 to 104:Replace above by:
Anyway, you can always change it in plugins\system\vmogmetatag\vmogmetatag.php
Find the following codes between lines 93 to 104:
else if ($option == "com_virtuemart" and $view == "productdetails") {
$product = $product_model->getProduct($virtuemart_product_id);
$product_model->addImages($product);
$productImage = str_replace(' ', '%20', $product->images[0]->file_url);
$vmogmetatag_image_thumb = ' <meta property="og:image" content="'.JURI::base().''.$productImage.'" />'. "\r\n";
}
else {
$vmogmetatag_image_thumb = ' <meta property="og:image" content="'.JURI::base().''.$vmogmetatag_image_instance.'" />'. "\r\n";
};
$vmogmetatag_desc = ' <meta property="og:description" content="'.$vmogmetatag_desc_instance.'" />'. "\r\n"; else if ($option == "com_virtuemart" and $view == "productdetails") {
$product = $product_model->getProduct($virtuemart_product_id);
$product_model->addImages($product);
$productImage = str_replace(' ', '%20', $product->images[0]->file_url);
$vmogmetatag_image_thumb = ' <meta property="og:image" content="'.JURI::base().''.$productImage.'" />'. "\r\n";
$vmogmetatag_desc = ' <meta property="og:description" content="'.$product->product_s_desc.'" />'. "\r\n";
}
else {
$vmogmetatag_image_thumb = ' <meta property="og:image" content="'.JURI::base().''.$vmogmetatag_image_instance.'" />'. "\r\n";
};
if(!isset($vmogmetatag_desc)) {
$vmogmetatag_desc = ' <meta property="og:description" content="'.$vmogmetatag_desc_instance.'" />'. "\r\n";
}
Post your reviews about us on our Facebook Page.
Post your testimonials and suggestions Here.
Don't forget to Close your topic when resolved.
Post your testimonials and suggestions Here.
Don't forget to Close your topic when resolved.
The topic has been closed.
Ok i got it 
I did add this and it work
The only thing left is to figure out how to put the $ before the price
I did add this and it work
$vmogmetatag_title = "\r\n" .' <meta property="og:title" content="'.$vmogmetatag_title_instance.','.number_format((float)$product->prices['salesPrice'], 2, '.', '').'"/>'. "\r\n";The only thing left is to figure out how to put the $ before the price
Last edit: Tue Dec 17, 2013 8:10 pm by encreplus
The topic has been closed.
You can manually put any text in the codes:
$vmogmetatag_title = "\r\n" .' <meta property="og:title" content="'.$vmogmetatag_title_instance.', $'.number_format((float)$product->prices['salesPrice'], 2, '.', '').'"/>'. "\r\n";
Post your reviews about us on our Facebook Page.
Post your testimonials and suggestions Here.
Don't forget to Close your topic when resolved.
Post your testimonials and suggestions Here.
Don't forget to Close your topic when resolved.
The topic has been closed.