Steffen Buschkemper
May 2, 2013, 05:48 PM
Hi @ All,
In this thread you can download the modified rating plugin.
The modified version is incl. Google Microdata for Listings.
To also show the prices at google, open the following file in
includes - > controllers -> listing_details.inc.php
Search the follow code @ line ~ 29
$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";
and replaced it with the following code
$sql = "SELECT `T1`.*, `T1`.`price` AS `Listing_price`, `T1`.`description_add` AS `Listing_info`, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";
Now search following code @ line ~ 43 and after this line
$rlSmarty -> assign_by_ref('listing_data', $listing_data);
add the following code
/* Listing Description for google rich snippets */
$listing_info = $listing_data['Listing_info'];
$listing_info = preg_replace('#\{.*?\}#m' , '' , $listing_info);
$listing_info = strip_tags($listing_info);
$listing_info = preg_replace("/[^ ]*$/", '', substr($listing_info, 0, 160));
$rlSmarty -> assign_by_ref('listing_info', $listing_info);
/* Listing Price and Currency for google rich snippets */
$listing_pval = $listing_data['Listing_price'];
$key1str = "data_formats+name+";
$key2str = preg_replace('/[^A-Za-z]/', '', $listing_pval);
$keystr = $key1str.$key2str;
$gprice = preg_replace('/[^0-9\.\,]/', '', $listing_pval);
$csign = mysql_query("SELECT `Value` FROM `" . RL_DBPREFIX . "lang_keys` WHERE `Key` = '{$keystr}'");
$listing_currency = mysql_result($csign, 0);
$listing_price = $gprice;
$rlSmarty -> assign_by_ref('listing_currency', $listing_currency);
$rlSmarty -> assign_by_ref('listing_price', $listing_price);
Save and close.
Attention!!! The original rating plugin must before uninstalled and removed from plugin folder.
All existing reviews will be lost!
Download, extract and install the modified rating plugin. -> 498
Now you just need to use the ISO 4217 currency code. Also Google rating accepts only 5 stars!
497
Here is also a List of ISO 4217 currency code -> Link (http://www.xe.com/iso4217.php)
The results of the search requests with google after this modification can you see in follow image...
499
Thats all....
Best regards
Steffen
In this thread you can download the modified rating plugin.
The modified version is incl. Google Microdata for Listings.
To also show the prices at google, open the following file in
includes - > controllers -> listing_details.inc.php
Search the follow code @ line ~ 29
$sql = "SELECT `T1`.*, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";
and replaced it with the following code
$sql = "SELECT `T1`.*, `T1`.`price` AS `Listing_price`, `T1`.`description_add` AS `Listing_info`, `T2`.`Path`, `T2`.`Type` AS `Listing_type`, `T2`.`Key` AS `Cat_key`, `T2`.`Type` AS `Cat_type`, ";
Now search following code @ line ~ 43 and after this line
$rlSmarty -> assign_by_ref('listing_data', $listing_data);
add the following code
/* Listing Description for google rich snippets */
$listing_info = $listing_data['Listing_info'];
$listing_info = preg_replace('#\{.*?\}#m' , '' , $listing_info);
$listing_info = strip_tags($listing_info);
$listing_info = preg_replace("/[^ ]*$/", '', substr($listing_info, 0, 160));
$rlSmarty -> assign_by_ref('listing_info', $listing_info);
/* Listing Price and Currency for google rich snippets */
$listing_pval = $listing_data['Listing_price'];
$key1str = "data_formats+name+";
$key2str = preg_replace('/[^A-Za-z]/', '', $listing_pval);
$keystr = $key1str.$key2str;
$gprice = preg_replace('/[^0-9\.\,]/', '', $listing_pval);
$csign = mysql_query("SELECT `Value` FROM `" . RL_DBPREFIX . "lang_keys` WHERE `Key` = '{$keystr}'");
$listing_currency = mysql_result($csign, 0);
$listing_price = $gprice;
$rlSmarty -> assign_by_ref('listing_currency', $listing_currency);
$rlSmarty -> assign_by_ref('listing_price', $listing_price);
Save and close.
Attention!!! The original rating plugin must before uninstalled and removed from plugin folder.
All existing reviews will be lost!
Download, extract and install the modified rating plugin. -> 498
Now you just need to use the ISO 4217 currency code. Also Google rating accepts only 5 stars!
497
Here is also a List of ISO 4217 currency code -> Link (http://www.xe.com/iso4217.php)
The results of the search requests with google after this modification can you see in follow image...
499
Thats all....
Best regards
Steffen