Questions tagged [commercetools]

The commercetools platform is a scalabale HTTP API-based cloud eCommerce solution that allows developers to create commerce solutions for all devices and platforms

The commercetools platform is a platform-as-a-Service eCommerce solution (formerly known as SPHERE.IO).

The HTTP API is the main and first-class way for developers to work with the platform.

You can work in your favorite programming language and framework and there are SDKs for Java 8, PHP and Node.js.

Getting started:

76 questions
0
votes
1 answer

Product Projection Search with Facets details alone. Need to avoid result array

Is there any way when I am searching products for one category just for facets alone. In this call I want to avoid result array Example : { "limit": 20, "offset": 0, "count": 20, "total": 24, "results": [], "facets":{ …
0
votes
1 answer

How to change sub-category to root category in CommerceTools

I need to change a sub-category of my project so that it is located at the root of the categories and not like now that it is a sub-category of another. I have tried the action "changeParent", but it requires me to put the id of another category and…
MiguelHoz
  • 49
  • 6
0
votes
2 answers

Can not get the access_token and token_type from TokenProvider commercetools/sdk-auth

I am trying to integrate the apollo-client with commercetools but not getting the token and tokentype details, below is the sample code. import ApolloClient from 'apollo-client'; import { createHttpLink } from 'apollo-link-http'; import { setContext…
0
votes
1 answer

Create an order with nested attributes in CommerceTools

I want to create an order that has the following representation { /* basic order fields ... */ // additional order fields "destination": { "id": "000", "name": "xxx", "country": "AB" }, "origin": { …
callback
  • 3,981
  • 1
  • 31
  • 55
0
votes
1 answer

Is it possible make reference by key?

Is it possible to set Reference value in custom field with type Reference by channel key? Because for now I have to find channel that I need by its key, get Id from it and make a reference! Reference channelRef =…
0
votes
1 answer

How to turn on product count in FacetedSearch?

I have a question. I am using ProductAttributeFacetedSearchSearchModel to build FacetedSearchExpression but in result set I see only sku count and productCount is null. How to turn on it? public FacetedSearchExpression
0
votes
1 answer

How to create new CustomTypes and CustomField from json file?

I have a question, I wanna to extend my categories with CustomType and CustomFields. I have my json files that lied in resource/migrate folder. I have json file like that: { "key": "category", "name": { "en": "CategoryNewFields" }, …
VIRICH
  • 177
  • 1
  • 14
0
votes
1 answer

Why the default shipping method doesn't apply to the cart?

I have a question about shipping addresses in cart. In cart documentation describes that the shipping method is used to determine eligible shipping method. Bu when I set shipping address to cart like this: final CartDraft draft =…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

What difference between Dsl and Builder classes for mapping some Drafts?

I have such a question about mapping Draft through the DSL classes and Builder classes. For example: CustomerDraftDsl and CustomerDraftBuilder What difference between this approaches except that Builder classes has method build()? Some of them…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

How can we add one more ProductType to Product?

I recently work with Commercetools and I have a question. How can we add one more ProductType to Product? I've heard it can be implemented by attribute reference. So, I'm trying to do this way: final Reference productTypeReference =…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

Why locale did not supported in project?

I recently work with Commercetools platform and I have a question. I'm trying to create cart with locale, but when I do this I've got error. io.sphere.sdk.client.ErrorResponseException: detailMessage: The locale 'en_US' is not part of the…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

How to get CartDiscounts for particular cart?

I recently work with Commercetools platform and I have such a question. How can I get a CartDiscounts for some particular cart? Now I have method for get Cart by Id and I wanna get all CartDiscount from Cart. How I can do that? Or CartDiscount…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

Why I cannot map modelMapper to Commercetools classes?

I recently work with ModelMapper and I have a question. I'm trying to map my CustomerRequest to Commercetools CustomerDraftDsl class. @Component public class CreateCustomerCommandMapper extends PropertyMap { …
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

Why I can get all Messages when Message HTTP REST API is disabled?

I recently work with Commercetools platform and I have a question. I disabled Message Settings in Admin Center you can see it here: But when I execute Query: client.executeBlocking(MessageQuery.of()).getResults(); I get all my Messages. Why is it…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30
0
votes
1 answer

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…
Mefisto_Fell
  • 876
  • 1
  • 10
  • 30