VirtueMart Forum

VirtueMart 2 + 3 + 4 => Security (https) / Performance / SEO, SEF, URLs => Topic started by: RedJohn on January 27, 2014, 17:13:11 PM

Title: how to change "search" in url?
Post by: RedJohn on January 27, 2014, 17:13:11 PM
Hi. How can i change url (/search/) from

www.domain.pl/search/any_keyword/

to

www.domain.pl/szukaj/any_keyword/

*"szukaj" mean "search" in polish language.
Title: Re: how to change "search" in url?
Post by: jjk on January 27, 2014, 21:00:02 PM
Create a copy of the search module and assign it the polish language. I would suggest to keep the the orginal but unpublish it, so you always have an original with it's default settings.
Title: Re: how to change "search" in url?
Post by: RedJohn on January 28, 2014, 10:41:07 AM
Thanks for help.
mod_virtuemart_search is assign in the polish language, but still not working.

I see in router php


if ( isset($query['search'])  ) {
$segments[] = $helper->lang('search') ;
unset($query['search']);
}


maybe i have no filie ini in my language. Where Can i find it? [$helper->lang('search') ]
Title: Re: how to change "search" in url?
Post by: jjk on January 28, 2014, 23:37:50 PM
"szukaj" should be in the file \language\pl-PL\pl-PL.com_virtuemart.sef.ini around line 59:
COM_VIRTUEMART_SEF_SEARCH="szukaj"

Did you install the polish language pack for VirtueMart and set the site (frontend) language to Polish?
Title: Re: how to change "search" in url?
Post by: RedJohn on January 29, 2014, 08:56:59 AM
Thanks jjk
I have this file, and polish language is enabled in frontent site.
I try override language... but... still not working.

Actually i manually change post data from "search" to "szukaj" and add this code


  $_SERVER['REQUEST_URI'] = preg_replace('/(^\/szukaj\/)(.*?)(\/$)/','/search/$2/',$_SERVER['REQUEST_URI']);


Now it's better, but... I do not preferre change SERVER variable.
Title: Re: how to change "search" in url?
Post by: jjk on January 29, 2014, 18:15:55 PM
Maybe there is a typo somewhere in your polish language files or overrides which prevents pl-PL.com_virtuemart.sef.ini from loading. Sometimes happens if the system detects a parsing error in a language file. If you enable 'Debug System' and 'Debug Language' in your Joomla configuration, you might see such errors listed at the bottom of the page views.