Page 1 of 1

Remove '/component/phocacart/' from search/query url

Posted: 13 Jul 2020, 19:48
by dmlwebal
Joomla 3.9.19
PHP 7.4.7
Phoca Cart 3.5.2
Premiere Gantry 5 Template

Hi,

I'm sure this has been asked before but cannot find the answer via forum search.

I need to 'change' the way that the url is formed for my site search, specifically this part of the url:

[domain]/component/phocacart/{search query}

It is only visible when I use the Search Module or the links from the Phoca Cart Brands Module
There is no way that the Joomla router can mask these urls in the same way as regular menu items, but I notice that the search result url is formed without the component or component name in the url on the demo site:

https://www.phoca.cz/phocacartdemo/

If you enter a term in the search module here, the url is e.g. https://www.phoca.cz/phocacartdemo/items?search=audi

I cannot think how to mimic this shorter version without resorting to creating xml files as per the Joomla docs. Or is that the only solution?

I just prefer not to 'broadcast' any obvious ways of hacking the cart software, and it looks more professional in the shorter 'demo' site style.

Thanks :)

Re: Remove '/component/phocacart/' from search/query url

Posted: 15 Jul 2020, 15:10
by Jan
Hi, in fact, routing has nothing to do with the component but with CMS itself. The format of url is made by Joomla! menu link. When you have component/phocacart in your url, this mostly means, the link to Phoca Cart in Joomla! menu link manager was not done. If yes, then some Joomla! routing feature is broken on your site. :idea:

Jan

Re: Remove '/component/phocacart/' from search/query url

Posted: 15 Jul 2020, 16:53
by dmlwebal
Hi Jan

Yes, I see what you mean.
So did you create search links in your menu on the demo site?

Regards
David

Re: Remove '/component/phocacart/' from search/query url

Posted: 16 Jul 2020, 17:49
by Jan
Hi, no, I just created one menu link to Phoca Cart - in this case to phoca cart items view. Such is then taken as a base for creating all Phoca Cart links.

Jan

Re: Remove '/component/phocacart/' from search/query url

Posted: 19 Jul 2020, 11:39
by dmlwebal
Hi Jan

Thanks, that is what I have missed.
:)
David

Re: Remove '/component/phocacart/' from search/query url

Posted: 27 Jul 2020, 22:01
by Jan
Ok