[Skip to main content](#vessel-content)

#   Re: Search by product code

##

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 8 months ago [\#7896](#7896) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  *[Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#7896 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")* was created by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")*

Business 1.4.5

Hi there,

in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.

Thanks, James

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

15 years 8 months ago -  15 years 8 months ago [\#7897](#7897) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#7897 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

You're not missing anything. Search is only done on the product name and the product description. We'll add that to the todo list.

Last edit: 15 years 8 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

15 years 8 months ago [\#7899](#7899) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#7899 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

In the mean time, you can look at that post where I gave a solution for the keywords search:
[ www.hikashop.com/en/support/forum/2-gene...-possible-.html#6840](http://www.hikashop.com/en/support/forum/2-general-talk-about-hikashop/6140-is-it-possible-.html#6840)
You can just change the name of the field and that should do the job.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 8 months ago [\#7922](#7922) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#7922 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

Okay thanks for the pointer. I'll add the product code search and post the code.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")**
- [![jameswadsworth's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/556-jameswadsworth "View jameswadsworth's Profile") Topic Author
- [ Offline](/forum/user/556-jameswadsworth)

Less More

- Posts: 274
- Thank you received: 5
-
-
-
- [](http://www.deanimaconsulting.com)
-

15 years 8 months ago [\#7923](#7923) by [jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")  Replied by *[jameswadsworth](/forum/user/556-jameswadsworth "View jameswadsworth's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#7923 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

case 'exact':
$text = $db-&gt;Quote( '%'.$db-&gt;getEscaped( $text, true ).'%', false );
$filters[] = "a.product_name LIKE ".$text;
$filters[] = "a.product_description LIKE ".$text;
$filters[] = "a.product_code LIKE ".$text;
if($multi){
$filters2[] = "b.value LIKE ".$text;
}
break;
case 'all':
case 'any':
default:
$words = explode( ' ', $text );
$wordFilters = array();
$subWordFilters1 = array();
$subWordFilters2 = array();
$subWordFilters3 = array();
$wordFilters2 = array();
foreach ($words as $word) {
$word = $db-&gt;Quote( '%'.$db-&gt;getEscaped( $word, true ).'%', false );
$subWordFilters1[] = "a.product_name LIKE ".$word;
$subWordFilters2[] = "a.product_description LIKE ".$word;
$subWordFilters3[] = "a.product_code LIKE ".$word;
if($multi){
$wordFilters2[] = "b.value LIKE ".$word;
}
}
$wordFilters[0]= '(' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters1). ')';
$wordFilters[1]= '(' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters2). ')';
$wordFilters[2]= '(' .implode( ($phrase == 'all' ? ') AND (' : ') OR ('),$subWordFilters3). ')';
$filters[] = '(' . implode( ') OR (', $wordFilters ) . ')';
if($multi){
$filters2[] = '(' . implode( ($phrase == 'all' ? ') AND (' : ') OR ('), $wordFilters2 ) . ')';
}
break;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[HadiTak](/forum/user/59336-haditak "View HadiTak's Profile")**
- [![HadiTak's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/59336-haditak "View HadiTak's Profile")
- [ Offline](/forum/user/59336-haditak)

Less More

- Posts: 33
- Thank you received: 1
-

1 year 11 months ago [\#364345](#364345) by [HadiTak](/forum/user/59336-haditak "View HadiTak's Profile")  Replied by *[HadiTak](/forum/user/59336-haditak "View HadiTak's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#364345 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

Is this feature added in new versions?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14280
-
-

1 year 11 months ago [\#364346](#364346) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Search by product code](/forum/2-general-talk-about-hikashop/7896-re-search-by-product-code#364346 "Business 1.4.5  Hi there,  in the backend you can find at product by product code. In the front end it appears that you can only search by name and description. Am I missing something? If I am not, and search works only for product name and description could I request that you add search by product code as well please.  Thanks, James")*

Hi,

Yes. You have two main ways to provide search on the frontend:

- You can use filters:
[ www.hikashop.com/support/documentation/1...-filter-listing.html](https://www.hikashop.com/support/documentation/100-hikashop-filter-listing.html)

- You can use Joomla's Smart search:
[ docs.joomla.org/Smart\_Search\_quickstart\_guide](https://docs.joomla.org/Smart_Search_quickstart_guide)
HikaShop comes with an integration plugin for Smart search, which you can configure via the Joomla plugins manager.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc4OTYtcmUtc2VhcmNoLWJ5LXByb2R1Y3QtY29kZT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.087 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
