Search products by product_code!?
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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?
Please Log in or Create an account to join the conversation.
To do that, you would have to edit the code of the plugin: plugins/search/hikashop_products.php
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
to:
and remove the block:
But it won't handle the unpublished categories and we display the variants even if they are associated to a product within unpublished categories.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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->get($row->id);
$product = $class->get($variant->product_parent_id);
$row->title = $product->product_name;
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
$row->title = $product->product_name;
you should use:
$row->title = $product->product_name.' '.$row->title;
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
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->Views and change the line:
if (isset ($this->element->main->product_name))
to:
if (hikashop_getCID('product_id')!=$this->element->product_id && isset ($this->element->main->product_name))
Please Log in or Create an account to join the conversation.
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 or Create an account to join the conversation.
If you upgrade before, you will indeed have to redo your modifications after the update/upgrade.
Please Log in or Create an account to join the conversation.