VirtueMart Forum

VirtueMart 1.1.x [ Old version - no longer supported ] => Translation / Languages VM 1.1 => Topic started by: Hermes on January 02, 2012, 12:07:39 pm

Title: Virtuemart/Joomfish - Search working in multiple languages
Post by: Hermes on January 02, 2012, 12:07:39 pm
This post is a continuation of this other post: http://forum.virtuemart.net/index.php?action=post;topic=21769.60;last_msg=291690

First, 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:

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?

FIRST
Look for...
Code: [Select]
$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:
Code: [Select]
/***** 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 *****/

SECOND
Look for all the lines like this one....
Code: [Select]
$sq .= "\n `#__{vm}_product`.`product_desc` LIKE '%$searchstring%') ";And substitute by this other one:
Code: [Select]
/***** 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)

Title: Re: Virtuemart/Joomfish - Search working in multiple languages
Post by: mariagarcia on December 13, 2012, 09:11:35 am
Hi Hermes.
I have
   - Joomla! 1.5.26 Stable
   - VirtueMart 1.1.9 Stable
   - Joom!Fish Version V2.2.3 (Feng Huang)

I made the changes you mentioned and does not work :(

I have good tables "jos_", some suggestion???

Thanks.
Title: Re: Virtuemart/Joomfish - Search working in multiple languages
Post by: Rosette Bravo on January 20, 2015, 13:23:04 pm
I have tried to find a solution to the forum, and I have not found it, so it resorts to the consultation, and that is that I am creating a store, which is practically translated Spanish-English. Pretty good, but being in English language, adding the product to the cart and authenticate (logging), I was going into Spanish (I have to go back to click the English flag to complete the purchase in that language.





__________________________
We provide guarantee to pass network plus study guide (http://www.passguide.biz/pdf-Comptia.html) gmat with online network+ exam (http://www.passguide.biz/pdf-Comptia.html) exam training Sterling College (http://www.youtube.com/user/SterlingCollege) itil and you can also get best quality Palm Beach Atlantic University (https://www.facebook.com/PBAUniversity) mcat along with Northwestern University (http://www.youtube.com/user/NorthwesternU) mcat for your guaranteed success.
Title: Re: Virtuemart/Joomfish - Search working in multiple languages
Post by: GJC Web Design on January 20, 2015, 16:40:49 pm
with VM1.1 ??????