This post is a continuation of this other post:
http://forum.virtuemart.net/index.php?action=post;topic=21769.60;last_msg=291690First, Thanks to Yves for putting me on the track of the final solution.
I've made this hack for a client with a virtuemart 1.5.x store, and I hope it helps someone else.
This hack is working perfect in:
- Joomla! 1.5.23 Stable
- VirtueMart 1.1.9 stable
- Joom!Fish Version V2.1.7 (Dafad)
All the code to substitute are located in the shop_browse_queries.php file inside administrator/components/com_virtuemart/html/.
As I have very changed this file in order to allow complicated filters, and allow store variables in the session, I put text to search inside the file
instead of number of lines, to look for the code to change, ok?
FIRSTLook for...
$join_array = array( 'LEFT JOIN `#__{vm}_product_price` ON `#__{vm}_product`.`product_id` = `#__{vm}_product_price`.`product_id`' );
and after this line insert this other code:
/***** Hack Alberto MultiLanguage *****/
if($keyword !='') {
$join_array[] = "LEFT JOIN `jos_jf_content` ON `jos_vm_product`.`product_id`=`jos_jf_content`.`reference_id` ";
}
/***** FIN Hack Alberto *****/
SECONDLook for all the lines like this one....
$sq .= "\n `#__{vm}_product`.`product_desc` LIKE '%$searchstring%') ";
And substitute by this other one:
/***** Hack Alberto MultiLanguage *****/
$sq .= "\n `#__{vm}_product`.`product_desc` LIKE '%$searchstring%' OR ";
$sq .= "\n ( `#__jf_content`.`value` LIKE '%$searchstring%' AND `#__jf_content`.`reference_table`='vm_product' AND `#__jf_content`.`reference_field`='product_s_desc' )) ";
/***** FIN Hack Alberto *****/
You must have this change five times to allow the hack also work when using keyword1 and keyword2.
Nothing more.
Greetings and Happy New Year from Barcelona(Spain)