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

#   Search products by product\_code!?

##

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37670](#37670) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  *[Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37670 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")* was created by *[protorob](/forum/user/5729-protorob "View protorob's Profile")*

Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product_code it doesnt get the products listed, how can i accomplish that?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#37786](#37786) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37786 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

You're talking about the back end ? If so, make sure that you select the "all sub elements" filter on the right.

If you're talking about the joomla search on the front end, make sure that you configured the hikashop products search plugin to use that product_code field.

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago -  14 years 9 months ago [\#37797](#37797) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37797 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

got it!

But now i see that it searches just in the main product's product_code, how can i make it look in the variants code too?

i.e.: I have man product with code 813-gen that stands for a tipe of marine cord but that marine cord is available in 2mm, 3mm and 5mm each one with a diferent code on the catalog but inside the product "marine cord" so i got:
813-gen for the "marine cord"
813002 for the "marin cord" "2mm"
813003 for the "marin cord" "3mm"
813005 for the "marin cord" "5mm"

when i search for 813005 it give me back nothinw, while i'm expecting to get "marin cord" "5mm" (buy it now!)

How can this be sorted out?

Last edit: 14 years 9 months ago by [protorob](/forum/user/5729-protorob "View protorob's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#37811](#37811) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37811 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Yes, the plugin only handle the search of information on main products, not variants.

To do that, you would have to edit the code of the plugin: plugins/search/hikashop_products.php

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37812](#37812) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37812 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

can you give me a clue about the lines to modify please?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#37912](#37912) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37912 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

The easiest is to change: Code:

$filters = array('a.product_published=1','a.product_type=\'main\'');

to: Code:

$filters = array('a.product_published=1');

and remove the block: Code:

if(hikashop_level(2)){ $catFilters = array('category_published=1','category_type=\'product\''); hikashop_addACLFilters($catFilters,'category_access'); $db-&gt;setQuery('SELECT category_id FROM '.hikashop_table('category').' WHERE '.implode(' AND ',$catFilters)); $cats = $db-&gt;loadResultArray(); if(!empty($cats)){ $filters[]='b.category_id IN ('.implode(',',$cats).')'; } } $leftjoin=' INNER JOIN '.hikashop_table('product_category').' AS b ON a.product_id=b.product_id';

But it won't handle the unpublished categories and we display the variants even if they are associated to a product within unpublished categories.

The following user(s) said Thank You: [protorob](/forum/user/5729-protorob "View protorob's Profile")

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37953](#37953) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37953 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

i think i can live with that, is just a matter of not having unpublished categories with unpublished products.
By the time i'll be finishing the whole website (is some kind of hardware store for ships and sealife in general) i'm shure that hikashop will be at version 2.8 and this issue will be solved.

Thanks in advance

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37962](#37962) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37962 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Now with the modification you suggested actually it finds "some" product when i put the product_code in the search field but it doesn't shows the product name neither a link to open it. I can't figure how to solve this yet

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#37965](#37965) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37965 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

That's because you didn't set a name in each of your variants.
Thus, the plugin display nothing for the name of the result.
You would have to do an additional query to load the corresponding product information in order to use the name of the name product and not the name of the variant.
So before the line:
if(method_exists($app,'stringURLSafe')){

add that:
$class = hikashop_get('class.product');
$variant = $class-&gt;get($row-&gt;id);
$product = $class-&gt;get($variant-&gt;product_parent_id);
$row-&gt;title = $product-&gt;product_name;

The following user(s) said Thank You: [protorob](/forum/user/5729-protorob "View protorob's Profile")

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37966](#37966) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37966 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Ok, i've realized that if the variant doesn't have any name it does'nt shows anything in the search results.
I've updated my csv giving to the variants the same product name as the main product and adding the name of the variant at the end so is easy to see if the product is the one we're searching.

When i click on the product it effectively goes to the product i'm looking for but the name of the product doesn't includes the variant as expected.
If you select another variant from the dropdown it add it at the end of the title after a ":"
But if you click automatically "add to cart" it put it on the cart with the right information.

Could be a solution by now.

Thanks

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago -  14 years 9 months ago [\#37967](#37967) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37967 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

that's a better solution!
Thank's Nicolas.

I'm adding the file i've modified as an attachment to this email.
So, for information, i'm using:

joomla 1.7.0 and
hikashop 1.5.6

the file attached overwrites this one

plugins/search/hikashop_products/hikashop_products.php

Last edit: 14 years 9 months ago by [protorob](/forum/user/5729-protorob "View protorob's Profile").

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#37974](#37974) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37974 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Another little thing,
It is possible to have the name of the variant(s) added to the title in the product search results?
I'm not good at all with php and i dont want to mess everything up.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#37980](#37980) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#37980 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Sure. Instead of:
$row-&gt;title = $product-&gt;product_name;

you should use:
$row-&gt;title = $product-&gt;product_name.' '.$row-&gt;title;

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#38001](#38001) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38001 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

unfortunately it doesn't work as expected.

When i search for the product variant by the code it actually gives me the name of the main product and when i click on the link on the search results it goes to the product with the correct variant selected but the title remains the one of the main product.

Lets say, the main product is "Marine Cord" with the title "Marine Cord".
As soon as i choose a variant, i.e. 6mm it ads ":6mm" at the end of the title so it becomes "Marine Cord : 6mm".
I've added an specific product code for that variant of the marine cord, let's say 82106, and when i search for it in the search module i'm still getting only "Marine Cord" when "Marine Cord : 6mm" is expected.

I feel that the solution is so simple...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#38073](#38073) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38073 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Could you give a link to that search page so that we can see the problem ?

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 9 months ago [\#38085](#38085) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38085 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Ok, the website is this one (i'm giving you the link to the first page of the catalog)

[ www.euromarnautica.com/it/shop/](http://www.euromarnautica.com/it/shop/)

you can test the search functionality with this product(the search module is that orange one up there in top-right corner of the header):

Main Product: TRECCIA STANDART IN POLIESTERE COLORE BIANCO
Main product_code: 811-gen

Product Variants codes:
5mm = 81105
6mm = 81106
7mm = 81107
8mm = 81108
10mm = 81110
12mm = 81112
14mm = 81114
16mm = 81116
18mm = 81118
20mm = 81120
22mm = 81122
24mm = 81124
26mm = 81126
28mm = 81128
30mm = 81130

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 9 months ago [\#38176](#38176) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38176 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

That's not a problem of the plugin.
IT's just the way the system is done for the display of the product page.
If you want to do that like you want, you will have to edit the file "show_default" (since 1.5.6) via the menu Display-&gt;Views and change the line:
if (isset ($this-&gt;element-&gt;main-&gt;product_name))

to:
if (hikashop_getCID('product_id')!=$this-&gt;element-&gt;product_id &amp;&amp; isset ($this-&gt;element-&gt;main-&gt;product_name))

The following user(s) said Thank You: [protorob](/forum/user/5729-protorob "View protorob's Profile")

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

- **[protorob](/forum/user/5729-protorob "View protorob's Profile")**
- [![protorob's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar5729.png)](/forum/user/5729-protorob "View protorob's Profile") Topic Author
- [ Offline](/forum/user/5729-protorob)

Less More

- Posts: 96
- Thank you received: 14
-
-
-
- [](http://www.euromarnautica.com)
-

14 years 8 months ago [\#38410](#38410) by [protorob](/forum/user/5729-protorob "View protorob's Profile")  Replied by *[protorob](/forum/user/5729-protorob "View protorob's Profile")* on topic *[Re: Search products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38410 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

Cool, now the title on the main product is working as expected!
The only thing that remains unchanged is the fact that in the search results i'm still having only the name of the main product without the ":variant selected" sufix
I think that if the modification is too heavy is something i can live with if it is going to be fixed in the near future.

The other question i have is related to the upgrading of the free to the business version, i'll follow the procedures indicated in the forums for upgrading my site to joomla 2.5 and eventually make a transition of the whole hikashop to the new version of joomla.

Am i going to modify these code again when my new installation of joomla+hika will be ready?

Thank's in advnance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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: 86323
- Thank you received: 14283
-
-

14 years 8 months ago [\#38553](#38553) 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 products by product\_code!?](/forum/2-general-talk-about-hikashop/37670-search-products-by-product-code#38553 "Today, after importing some products throught the csv import i've realized that if i put in the searchbox the product&#95;code it doesnt get the products listed, how can i accomplish that?")*

We'll look at adding an option to handle that for next version.

If you upgrade before, you will indeed have to redo your modifications after the update/upgrade.

The following user(s) said Thank You: [protorob](/forum/user/5729-protorob "View protorob's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzM3NjcwLXNlYXJjaC1wcm9kdWN0cy1ieS1wcm9kdWN0LWNvZGU/dG1wbD1tYXJrZG93bg==) 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.123 seconds

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