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
4
votes
1 answer

Commercetools - Use query predicates to filter on a collection attribute

I'd like to get all the Category items that have between their ancestors an ancestor with a certain "id". Here is the JSON of one of the categories returned by GETting from /categories: { "id": "4627f3b0-fe52-4cc6-b03e-3fd72e701342", …
andrea.rinaldi
  • 1,167
  • 1
  • 13
  • 33
4
votes
2 answers

Can I host my own database in Commercetools platform?

It is possible in magento where I can set my inhouse database at localhost. Can I do the same with commercetools? I do not like to share my data with commercetools, but I still want to use it.
rhldonly1
  • 91
  • 4
4
votes
2 answers

sphere.io custom fields on objects

On Sphere.io, I know it is possible to attach custom data to Product objects, using the custom attributes. Is it possible to do something similar with the Customer and Order objects? Just untyped key-value String pairs would be fine for my scenario…
Martin Konicek
  • 39,126
  • 20
  • 90
  • 98
3
votes
1 answer

Is it possible to create faceted search in CT using product attributes?

I am able to create faceted search using variants' attributes: .plusFacets(facets -> facets.allVariants().attribute().ofString(sizeDescriptionAttribute).allTerms()) But I haven't managed to perform the same if I wanted to do it using products'…
Eder
  • 1,874
  • 17
  • 34
3
votes
4 answers

How to generate Order Numbers in commercetools

When I create an Order from a Shopping Cart on the commercetools API (documented here: http://dev.commercetools.com/http-api-projects-orders.html#create-order-from-cart ), I have to set the orderNumber manually. The Number is important because the…
nkuehn
  • 138
  • 10
2
votes
1 answer

How to maintain login session active even after refreshing page in Vuejs?

signInMe() { this.$store.dispatch('setLoggedUser', true); this.$store.dispatch('setGenericAccessToken', response.data.access_token); this.errorMessage = ""; }, (error) => { if (error) { …
T dhanunjay
  • 790
  • 1
  • 13
  • 46
2
votes
1 answer

Querying commercetools custom fields

I'm trying to query custom fields using commerce tools. given an object as below { [...] "custom": { "type": { "key": "my-category" }, "fields": { "returns": [ {obj: {readStatus: "random"}, …
myrdstom
  • 156
  • 3
  • 15
2
votes
2 answers

How to obtain all ProductTypes created in my commercetools project?

I need to obtain all the ProductType that have been defined in my commercetools project because I have to use the localized value of the "name" to perform a search in a file system. Basically I need to use the JVM SDK to extract the list of…
MiguelHoz
  • 49
  • 6
2
votes
1 answer

Microservice of Commercetools cart API

As per documentations of commercetools, all the microservices(carts, order, shipping method etc) are independent of each other. Calling the below API in POSTMAN : https://api.sphere.io/{{myproject-key}}/carts/{{cartId}} Body part: { …
rhldonly1
  • 91
  • 4
2
votes
1 answer

How to get category name from unique ID in Commercetools platform?

I am attempting to get the names of all categories that a product belongs to in Commercetools platform. I can get the unique ID of each category tied to a product through the following call: final ProductProjectionQuery query =…
jaikarve
  • 21
  • 1
2
votes
1 answer

how to use custom fields in line items within commercetools platform

I actually have to add some custom fields to every line item within the commercetools platform. Line Item Docs => http://dev.sphere.io/http-api-projects-carts.html#line-item There I found this: =>…
Emtii
  • 21
  • 3
1
vote
1 answer

How can I combine multiple categories into a single entity?

Having studied the documentation and queries in commercetools, I could not find the following thing. I know that a product has variants and multiple products can be combined into categories, but how do I combine multiple categories into something…
Dmitriy
  • 11
  • 2
1
vote
0 answers

CommerceTools GraphQl query

I am trying to run this query in react app , I am using using apollo client, It run successfully but does give me expected result. My Query { productProjectionSearch(filters: {string: "categories.id:\"011d3888-27be-4d11-bf1e-4e3ccb737c8b\""},…
dan kia
  • 11
  • 2
1
vote
1 answer

How to filter by date when accessing the commercetools platform with cURL

I need to filter a request by date to pull some data from Commercetools. I have the below currently but it is not filtering response = requests.get('https://api.?limit=500&filter=results.createdAt=2021-10-10T21:31:31.231Z',…
helloyes
  • 13
  • 2
1
vote
1 answer

Fetch data from our merchant center using the PHP sdk v2

Just give an example like fetching product info or fetching categories. I am using this code. As I am running this code I am not getting any categories. Please provide any example of fetching the data
Deep
  • 13
  • 7
1
2 3 4 5 6