Is it possible to add custom field to Product? - commercetools

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

Related

How I make a Recommendation to be displayed on a CRM Analytics Dashboard?

I am learning Einstein Recommendations and I love it! My only problem is I find its displayed information (title, description, image) too limited.
I am working with a product object I want to recommend, a recipient object, which is a customer, and a junction object that solves a many-to-many relationship and represents an offer. I have also made a dashboard where I display the product offers to a specific customer, considering their own interests.
I would like to make a boolean field in my junction object called "IsRecommended__c" where I store whether the record is recommended by Einstein or it isn't. Then I can make a recipe filter where I display only those products that are being recommended (set TRUE) to a specific customer.
My problem is I don't' know how I make the IsRecommended__c field to store that data. Should I use Strategy builder, flow, coding? Or maybe there is another way to implement these Einstein recommendations into Dashboards?
I hope there is a solution to this!
Thank you in advance!
Best regards,
Andrés

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!

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

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

Specify Angular Schema Form Select drop down options using scope

I've been looking at using Angular Schema Form to define all my forms for my project but one thing that stood out to me massively is that when we define a select/drop-down element, the values have to be specified then and there in the JSON. This doesn't strike me as very flexible as I want these values to be retrieved from my Angular controller/factory as they are currently available on the scope.
I've done quite a bit of searching on how to get round this but haven't found a definitive solution or anything that worked for me so I decided to try to extend the Select myself and add a mapping to the schemaFormDecoratorsProvider.
I have followed the documentation for Extending Schema Form, and now have an HTML snippet which defines my Select control and this is being rendered when I define it in my JSON schema. What I want to be able to do is to specify the ng-options attribute either in part as a whole via the JSON schema. I have tried to do this but nothing seems to result in the select options being rendered.
Here is part of my select control:
<select ng-model="$$value$$"
ng-model-options="form.ngModelOptions"
sf-changed="form"
schema-validate="form"
ng-options="item.value as item.name for item in form.titleMap"
ng-disabled="form.readonly">
</select>
Where ng-options is defined, I want to be able to either specify titleMap in my JSON and it be resolved to an object on my scope or I can pass the name of the collection in my JSON and then pass that in where form.titleMap currently sits.
Anybody had any experience doing this? To me is seems like a fairly reasonable requirement but can't find much help on the web about it.
Many thanks.
There are add-ons designed to support dynamic data selection, the library has no preference and leaves it up to the developer to select the most appropriate for their needs, however I built the Material Design decorator to include the capabilities of angular-schema-form-external-options in the decorator so the add-on is not needed. The bootstrap decorator does not have this capability at this stage.
The angular-schema-form-external-options library is basic but covers most requirements for simple dynamic drop down data population
The angular-schema-form-dynamic-select is a more robust and feature full option with a variety of configurable options.

Making an existing content type a field in another content type in Drupal 7

I'm still working my way up the learning curve for Drupal and I can't seem to find an answer.
I have created a custom content type. In my case, it describes an investment property (purchase price, rental income, etc).
I now want to create another couple content types: Expense and Income that will be used to track any expenses or income that apply to a particular property.
What I can't figure out is how to let the user choose which property an expense or income would apply to. That is, I want a field where the user can select the property.
Do I need to write a module that makes the property available as a field?
Thanks in advance.
I think the references module might help.
http://drupal.org/project/references
I don't have extensive experience with it, although I thought I'd point you towards it. If it's what you need, I'm sure others with more experience than myself will chip in and help you out if you have more specific questions.

Resources