Author Topic: Searching in multiple languages  (Read 79575 times)

Knud Lazuri

  • Beginner
  • *
  • Posts: 23
Re: Searching in multiple languages
« Reply #45 on: April 10, 2009, 09:47:32 am »
Hello,

The modified shop_browse_queries.php by loic worked for me, just when I was about to give up ...

Joomla version 1.5.10
Virtuemart 1.1.3
Joom!Fish Version V2.0.3

Thank you to everyone who made it possible :-)

fred_k

  • Beginner
  • *
  • Posts: 2
Re: Searching in multiple languages
« Reply #46 on: May 13, 2009, 09:35:56 am »
Hello,
I use Joomla version 1.15.9
Virtuemart 1.1.3
Joomfish 2.03
I have follow all instructions but I till have the same problem, I have the headline of the results (as he find search results) but I have a blank page under. So I can't see any results from the search. Is someone have an idea ?
Thank for all suggest !

cquaresma

  • Beginner
  • *
  • Posts: 2
Re: Searching in multiple languages
« Reply #47 on: May 13, 2009, 11:26:45 am »
like Knud lazuri, I have:
Joomla version 1.5.10
Virtuemart 1.1.3
Joom!Fish Version V2.0.3
I use English language as primary, Portuguese, Spanish and German

O used shop_browse_queries.php by loic and the search is working now for all languages but i have this error in the search result:

Notice: Undefined variable: jf in C:\Program Files\EasyPHP 3.0\www\juvenalcork\administrator\components\com_virtuemart\html\shop_browse_queries.php on line 47

Any help?

Thanks!

fred_k

  • Beginner
  • *
  • Posts: 2
Re: Searching in multiple languages
« Reply #48 on: May 13, 2009, 16:51:41 pm »
I think your shop_browse_queries.php is not configured for local. WHat have you in line 47 ?

cquaresma

  • Beginner
  • *
  • Posts: 2
Re: Searching in multiple languages
« Reply #49 on: May 21, 2009, 14:35:20 pm »
problem fix
thanks any way

quantum_leap

  • Beginner
  • *
  • Posts: 10
    • My CV
Re: Searching in multiple languages
« Reply #50 on: June 04, 2009, 23:30:27 pm »
Have same problem, could you tell me what you did to fix it?
Joomla! 1.5.15, VirtueMart 1.1.4 stable

diplomat_111

  • Beginner
  • *
  • Posts: 1
Re: Searching in multiple languages
« Reply #51 on: June 25, 2009, 11:40:30 am »
So, i would
like to ask another question. Can I resell any  national domain
like .az, .ru, .uz, .eu? for example i have got book.ru domain and wanna sell that. what is the juridiction procedure ?Is there any law regulating that?
Thanks beforehand...
Eyvaz Alishov

bwijnholds

  • Beginner
  • *
  • Posts: 2
Re: Searching in multiple languages
« Reply #52 on: July 15, 2009, 11:49:19 am »
Works perfect, thank you.
Also the virtuemart product scroller shows products in the correc languages.

publipoint

  • Beginner
  • *
  • Posts: 22
Re: Searching in multiple languages
« Reply #53 on: September 19, 2009, 10:23:46 am »
Thank you!!!! Fixed my issue as well.

spottedsparrow

  • Beginner
  • *
  • Posts: 40
    • www.spottedsparrow.com
Re: Searching in multiple languages
« Reply #54 on: September 24, 2009, 10:21:02 am »
Thank you!
The Spotted Sparrow
eco-friendly, vintage inspired paper goods

jedipi

  • Beginner
  • *
  • Posts: 6
Re: Searching in multiple languages
« Reply #55 on: September 25, 2009, 01:21:33 am »
I am running a vm website with joomla 1.5.14 + vm1.1.3 + joomfish 2.03
I applied this product search hack in order to search vm product in all language.
what I did is add the following coding in shop_browse_queries.php file
Code: [Select]
    // hack joomfish
      $jf .= "LEFT JOIN ( SELECT `reference_field` , `reference_id` , `value` FROM `#__jf_content`";
      $jf .= " WHERE `reference_table` = 'vm_product' AND `published` = 1 " ;
      $t = array();
      if (!empty($keyword))  $t[] = " `value` LIKE '%$keyword%'";
      if (!empty($keyword1)) $t[] = " `value` LIKE '%$keyword1%'";
      if (!empty($keyword2)) $t[] = " `value` LIKE '%$keyword2%'";
      if (count($t)) $jf .= " AND ( " . implode(" OR ", $t) . " ) ";
      $jf .= ") AS trad ON `#__{vm}_product`.`product_id` = `trad`.`reference_id`";
      $join_array[] = $jf;
    // end hack

after a few days, My website was shutdown by hosting company because of the slow mysql query and high CPU usage. This happen after the hack was applied.

The related sql statement is as follow
Code: [Select]
    # Query_time: 15  Lock_time: 0  Rows_sent: 412  Rows_examined: 1576917
    SELECT DISTINCT `product_name`,`products_per_row`,`category_browsepage`,`category_flypage`,`jos_vm_category`.`category_id`,
    `jos_vm_product`.`product_id`,`product_full_image`,`product_thumb_image`,`product_s_desc`,`product_parent_id`,`product_publish`,`product_in_stock`,`product_sku`, `product_url`,
    `product_weight`,`product_weight_uom`,`product_length`,`product_width`,`product_height`,`product_lwh_uom`,`product_in_stock`,`product_available_date`,`product_availability`,`jos_vm_product`.`mdate`, `jos_vm_product`.`cdate` FROM (`jos_vm_product`, `jos_vm_category`, `jos_vm_product_category_xref`,`jos_vm_shopper_group`) LEFT JOIN `jos_vm_product_price` ON `jos_vm_product`.`product_id` = `jos_vm_product_price`.`product_id`
    LEFT JOIN ( SELECT `reference_field` , `reference_id` , `value` FROM `jos_jf_content` WHERE `reference_table` = 'vm_product' AND `published` = 1 ) AS trad ON `jos_vm_product`.`product_id` = `trad`.`reference_id` WHERE `jos_vm_product_category_xref`.`product_id`=`jos_vm_product`.`product_id`
    AND `jos_vm_product_category_xref`.`category_id`=`jos_vm_category`.`category_id`
    AND ((`jos_vm_product`.`product_id`=`jos_vm_product_price`.`product_id` AND `jos_vm_shopper_group`.`shopper_group_id`=`jos_vm_product_price`.`shopper_group_id`) OR `jos_vm_product_price`.`product_id` IS NULL)
    AND `jos_vm_shopper_group`.`default` = 1
    AND `product_parent_id`=0
    AND `product_publish`='Y'
    AND `category_publish`='Y'
    GROUP BY `jos_vm_product`.`product_sku`
    ORDER BY `jos_vm_product`.`cdate` DESC LIMIT 0, 2000;


I guess it is because the sql statement is too long and the result row is too much (Rows_examined: 1576917).

there are only about 400 products in my vm shop.

Does anyone know what the problem is??? is there any fix??
Thanks

salbini

  • Beginner
  • *
  • Posts: 40
Re: Searching in multiple languages
« Reply #56 on: November 11, 2009, 00:00:30 am »
I've been using the modified file from Yves on the first page or second i don't remember now, and after a few my Dedicated server was getting really really slow, to don't talk about the website.

The mysql server was loaded severely, using in most cases 100% of both cpu installed on the server, so I had to come back to the original file.

Has anyone a solution for this, or an alternative to can search in all joomfish languages?


salbini

  • Beginner
  • *
  • Posts: 40
Re: Searching in multiple languages
« Reply #57 on: November 11, 2009, 23:00:12 pm »
Seems to be no solution to this problem ! :(

salbini

  • Beginner
  • *
  • Posts: 40
Re: Searching in multiple languages
« Reply #58 on: November 16, 2009, 18:16:17 pm »
HI modified with a friend's help the file I downloaded from you on this post.
We've added the variable `reference_field` = 'product_name'" ;
in this way you make search only into the products fieldm, and not into the short description, and description fields.
This load less then the one hacked from Yves the mysql server.
I'm using it from 4 days with Joomla 1.5.15 +JOomfish 2.04 and virtuemart 1.1.4
I'm having an huge traffic on the site in these days ad everything is working fine.

Let's try it and let me know http://www.fesal.info/multilanguage_search.zip

salbini

  • Beginner
  • *
  • Posts: 40
Re: Searching in multiple languages
« Reply #59 on: December 09, 2009, 15:28:12 pm »
would you guys be able to add to this hack somethings that tells to search only through product name field and only into the session language?

    // hack joomfish
      $jf .= "LEFT JOIN ( SELECT `reference_field` , `reference_id` , `value` FROM `#__jf_content`";
      $jf .= " WHERE `reference_table` = 'vm_product' AND `published` = 1 " ;
      $t = array();
      if (!empty($keyword))  $t[] = " `value` LIKE '%$keyword%'";
      if (!empty($keyword1)) $t[] = " `value` LIKE '%$keyword1%'";
      if (!empty($keyword2)) $t[] = " `value` LIKE '%$keyword2%'";
      if (count($t)) $jf .= " AND ( " . implode(" OR ", $t) . " ) ";
      $jf .= ") AS trad ON `#__{vm}_product`.`product_id` = `trad`.`reference_id`";
      $join_array[] = $jf;
    // end hack