Skip to main content

Search engine in subscription list not working?

7 years 1 month ago #311123 by oloccina
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.

7 years 1 month ago #311133 by Jerome
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.

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

7 years 1 month ago #311137 by oloccina
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.

7 years 1 month ago #311142 by nicolas
Hi,

Try changing the code:
Code:
$searchMap = array( 'subscription.subscription_id', 'subscription.subscription_data', );
to:
Code:
$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.

7 years 1 month ago #311161 by oloccina
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.

7 years 1 month ago #311165 by nicolas
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.

7 years 1 month ago #311179 by oloccina
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.

7 years 1 month ago - 7 years 1 month ago #311225 by oloccina
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: 7 years 1 month ago by Jerome.

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

7 years 1 month ago #311230 by Jerome
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.

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

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