Developer forum

Forum » Ecommerce - Standard features » New Index: variant fields on main product

New Index: variant fields on main product

Nuno Aguiar
Reply

Hi,

 

I have an issue and I don't know what the best approach is to fix it.

 

Problem

We are listing only the main products (not variants)

We have a free text search field that, besides a number of fields from the main product, needs to search the variants product number

Ex:

  • Main product ID = PROD1
  • Product variants's number (not the ID) = 111, 112, 113
  • If I search for 111, I get PROD1

 

Possible solution

The most obvious solution is to have a field in the main product that contains all of the variant's product numbers, but this means the user needs to update those fields accurately, which does not make sense for the customer.

 

Is there a better way to do it? Can I index some fields to the main products that belong to the variant?

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

You are lookin for the same thing as Adrian. That a product and all its variants is in one document in the Lucene.

But, you can create a IIndexBuilderExtender that will add your own fields to the document, see example here: http://developer.dynamicweb.com/forum/cms-standard-features/new-index-sort-product-order-in-product-group.aspx?PID=48

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Thanks, we'll give it a go.

 

Best Regards,

Nuno Aguiar

 
Adrian Ursu
Reply

Hi Nuno,

Please keep me posted with the result. We are eager to use that as well.

Thanks,

Adrian

 
Nuno Aguiar
Reply

Hi Adrian,

 

Will do!

 

Best Regards,

Nuno Aguiar

 
Nuno Aguiar
Reply

Hi Adrian,

 

There were other implications in the project and the customer agreed to listing variants, so we ended up not developing this. I am sure we'll have to experiment with it in a future project though. I can let you know when that happens.

 

Best Regards,

Nuno

 
Adrian Ursu
Reply

Hi Nuno,

Thanks for letting me know.

I am sure we gonna experiment it at some point :)

Regards,

Adrian

 

You must be logged in to post in the forum