Search engine in subscription list not working?

  • Posts: 224
  • Thank you received: 8
4 years 7 months ago #311123

Hello,
when I input a username in the search field in the subscriptions list I always get an empty result.
I have checked and the user is indeed there with an active subscription.

It seems the search engine only works for the "subscription data" column, which in my case is not really useful because it just contains a random value.
I need to be able to search mainly usernames, is this a bug or you plan to implement it in the future?

Thank you

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 7 months ago #311133

Hello

We will look into it.
Are you trying to look for the username or the user address.
Since subscription is linked to HikaShop users, the search can look faster on HikaShop userd fields (such as the email)

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: 224
  • Thank you received: 8
4 years 7 months ago #311137

I also tried to search the user email but is still not working for me

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
4 years 7 months ago #311142

Hi,

Try changing the code:

		$searchMap = array(
			'subscription.subscription_id',
			'subscription.subscription_data',
		);
to:
		$searchMap = array(
			'subscription.subscription_id',
			'subscription.subscription_data',
			'hk_user.user_email',
			'j_users.username',
			'j_users.name',
		);
in the file administrator/components/com_hikaserial/views/subscription/view.html.php
That should allow you to search for the name, username and email addresses of the subscriptions.

The following user(s) said Thank You: Jerome

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

  • Posts: 224
  • Thank you received: 8
4 years 7 months ago #311161

Done,
when testing a search for username (the username does exist in the list, I can see it)

Joomla throws out this error
Unknown column 'hk_user.user_email' in 'where clause'

The subscriptions list page remains blank with the error message even when reloading it,
it goes back to the normal list view when I change the edit you suggested in the code to the original code

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

  • Posts: 81513
  • Thank you received: 13068
  • MODERATOR
4 years 7 months ago #311165

Hi,

This would indicate that you don't have the same code I have in that file. Could you tell us which version of HikaSerial you're using ?

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

  • Posts: 224
  • Thank you received: 8
4 years 7 months ago #311179

I am using the latest version
Hikaserial 3.0.1
Hikashop 4.2.1
Joomla 3.9.11

I have sent you the access details a couple of days ago for another issue I had and you are looking into it, in case you want to acces the website/files directly

Thank you

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

  • Posts: 224
  • Thank you received: 8
4 years 7 months ago #311225

I have to close access to the live site for security reasons,
but I attach here my file
administrator/components/com_hikaserial/views/subscription/view.html.php

in case you need it for testing

Last edit: 4 years 7 months ago by Jerome.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
4 years 7 months ago #311230

Hello,

Thank you for the file ; I was able to see that you do have the latest version.
But in order to add a search on an extra table, it requires a bit more than the declaration of the field for the searchMap.
I will work on the modifications to add that directly in the HikaSerial next release.

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.

Moderators: Obsidev
Time to create page: 0.080 seconds
Powered by Kunena Forum