Joomla Search Module not working with Hikashop

  • Posts: 6
  • Thank you received: 0
9 years 4 months ago #208141

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.4.24
-- Browser(s) name and version -- : Google Chrome 43.0.2357.132
-- Error-message(debug-mod must be tuned on) -- : 404

Page Not Found with Joomla Search Module.

Dears,
I apologise for writing what seems yet another thread on this discussion.

I enabled the Joomla Search Module on my website (still under construction) gsrmodels.com and tweaking with HikaShop Starter: when I search for a product I added I get the results displayed. However when I click it I get a 404 - Page Not Found error. You can try by yourself by searching for "locomotiva" on the right side of the menu; you should get three results and none of them works, even though they are displayed just fine by HikaShop in the website.

As far as I understood, it something that has to do with HikaShop Search Plugin and configuring some sort of IDs, but so far I couldn't get it working. I've tried reading countless of threads from this forum but I couldn't get my issue fixed, so an eventual step-by-step help would be most appreciated.

Yours truly.

Last edit: 9 years 4 months ago by gsr.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
9 years 4 months ago #208168

I have the same issue. What I notice though is when I hover my mouse over the link in the results, the link has ".../component/search/" appended to it. I thought it was a product issue but then I would search for a product in a different way and the result is that sometimes I can generate search results without the appended bit on the link in which case it works. I have also tried different IDs and disable VM plugins and modules (as I started building with VM and got over the unneccessary complexity).

Check yours in the same way, maybe we have the same thing going on and some clever chap can help us debug it.

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 4 months ago #208144

Hi,

Please be sure that you do not have incorrect "canonical url" configured in your products.
Because the plugin will use that link in the product to generate the links.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
9 years 4 months ago #208299

Thanks Jerome

- Under Force Cannonical setting I have Use and generate if missing.
- Joomla SEF turned on. If turned off, search works but then obviously non-friendly URL's
- Each product has a cannonical URL that has been generated.
- I am still getting the "/component/search" appended to the URL when I use the Joomla Search module.
- In the Search module I have Set ItemID as "Home" which is the homepage link set as a Hikashop product category type.

What else could I look at?

As I said, I don't always get the 404 error for the same product. It just depends on how I search. Site is beachways.co.za if you would like to try it.

Thanks for the help!

Please Log in or Create an account to join the conversation.

  • Posts: 43
  • Thank you received: 3
9 years 4 months ago #208313

I have exactly the same problem: /components/search appended to URL resulting in 404 error.
My canonical URL setting is 'Use canonical URL if specified'.
A fix would be much appreciated.

Please Log in or Create an account to join the conversation.

  • Posts: 82867
  • Thank you received: 13373
  • MODERATOR
9 years 4 months ago #208316

Hi,

We've had a closer look at the problem.
It seems to come from the call to SEF system by the search system.
Change the code:

				if(empty($row->product_canonical)){
					$rows[$k]->href = 'index.php?option=com_hikashop&ctrl=product&task=show&name='.$row->alias.'&cid='.$row->id.$Itemid.$parent;
				}else{
					$rows[$k]->href = $row->product_canonical;
				}
to:
if(empty($row->product_canonical)){
					$rows[$k]->href = JRoute::_('index.php?option=com_hikashop&ctrl=product&task=show&name='.$row->alias.'&cid='.$row->id.$Itemid.$parent);
				}else{
					$rows[$k]->href = $row->product_canonical;
				}
				$rows[$k]->href = hikashop_cleanURL($rows[$k]->href);
in the file plugins/search/hikashop_products/hikashop_products.php in order to bypass the SEF call from the search system and that should work properly

The following user(s) said Thank You: SarahW, omkar123

Please Log in or Create an account to join the conversation.

  • Posts: 3
  • Thank you received: 0
9 years 4 months ago #208449

Excellent! Seems to be working! Thanks a lot!

Please Log in or Create an account to join the conversation.

  • Posts: 37
  • Thank you received: 0
9 years 4 months ago #209550

thnx for the help worked for me too!!! :)

Please Log in or Create an account to join the conversation.

Time to create page: 0.116 seconds
Powered by Kunena Forum