How to filter for localized fields in the Commercetools ProductProjectionsSearch API? - commercetools

I tried to filter for the brand but never got any results back. Brand was a localized text attribute on my products. I used the following variations:
variants.attributes.brand:"LEGO"
variants.attributes.brand.de:"LEGO"
masterVariant.attributes.brand:"LEGO"
masterVariant.attributes.brand.de:"LEGO"
I'm using the node.js-SDK btw.

the pattern for filters on attributes of localized text type is
variants.attributes.{name}.{lang}:"{value}"
To analyze why this is not working for you, please create a support ticket on https://support.commercetools.com
Thanks
Stefan

Related

Cross fromula fields from Opportunity to Quote with custom fields

I'm trying to access some custom fields in the Quote object from Opportunity Object.
I tried to use cross formula fields to access the fields via SyncedQuote, but for some reason not all my custom fields from the Quote Object appear in the dropdown menue.
Is there any reason why only some some custom fields can be linked and others can't?
In general I want to build a VisufalForce PDF formula set up on the Opportunity Objects, for which I need data from the Quote custom fields. Is there any other possibilty to archieve that?
It is important to notice that my company doesnt have the enterprise licence, so no apex code is available. Can this be archived without?
Many Thanks!

Is it possible to add custom field to Product?

I recently work with Commercetools and I have a question.
I've looked on CustomFields documentation https://docs.commercetools.com/http-api-projects-custom-fields#custom and it became interesting to me.
How can we add custom field to product level and to variant level? Is it possible? Or can we add CustomFields to ProductType?
Thanks for the request.
Custom types are not needed on products as the product types define all the attributes required for a product.
see https://docs.commercetools.com/http-api-projects-productTypes#attributedefinition for a complete documentation of the attributes you can define.
Best Regards
Brian

How to retrive perticular contacts only using Contacts API

I have added one custom attribute as "category". It's values should be 'Sales','Support' etc.
I have to retrieve only those contacts who have category as custom attributes.
I tried using below code. But It is not giving the excepted results.
ContactFeed profileFeed = contactService.getFeed(new URL("https://www.google.com/m8/feeds/contacts/"+domain+"/full/?xoauth_requestor_id="+adminEmail+"&start-index="+startIndex+"&q="+searchText),ContactFeed.class);
can anyone tell me ? Is there any way to retrieve only those contacts who have 'Category' as custom attribute.?
Yes its possible, ive done ot before with some tricks. If you include a unique string in the properties, you can then search custom properties. For example prepend # to all your custom properties, then search cor those properties that contain "#". Ive done this from apps script though not fhe raw http api.

Need plugin to overwrite default title

Im trying to write a plugin for Nutch based on http://sujitpal.blogspot.com/2009/07/nutch-custom-plugin-to-parse-and-add.html to get a custom title finder.
This works well, and storing extracted titles in new field is no problem. But I want to use it in Solr instead of default title. The problem is Solr needs multivalued fields as I have 2 title fields.
metadata.remove("title");
didnt work.
I really want to use the new title instead of the default one created by Nutch. Any suggestions?
Why don't you put your title in a different field, thus it will be handled properly ?

Change type of Datastore field to Text from String?

I can't seem to do this. The list that the app engine datastore viewer does not contain Text as an option. I had to change my fields because some of my values were too long for String, but now I can't retroactively fix my old entries.
To change the property type used by the old entities, you need to manually update each of them.
This can be easily and efficiently accomplished using the mapper API. This guide explains how to use this API.
You may also want to read this blog post by Nick Johnson.
You don't have to fix your old entries. The old ones should work as is, and the new ones just won't be indexed.
See
http://groups.google.com/group/google-appengine/browse_thread/thread/282dc825f9c46684 .

Resources