Greetings,
We are using POST /product (Fetch a list of products | Store API) to retrieve products from SW API. Unfortunately, we are not able to filter the products with price less than 30 Euro. This is the request body we pass:
{
„includes“: {
„dal_entity_search_result“: [„elements“, „total“],
„product“: [
„id“, „createdAt“, „name“, „productNumber“, „markAsTopseller“, „calculatedPrice“
],
„calculated_price“: [„totalPrice“]
},
„sort“: [
{ „field“: „createdAt“, „order“: „DESC“ },
{ „field“: „productNumber“, „order“: „ASC“, „naturalSorting“: true }
],
„filter“: [
{
„type“: „range“,
„field“: „calculatedPrice.totalPrice“,
„parameters“: { „lte“: 30 }
}
],
„total-count-mode“: 2,
„page“: 1,
„limit“: 30,
„associations“: {
„children“ : ,
„media“ : ,
„deliveryTime“: ,
„tags“ : ,
„unit“ : ,
„categories“ : ,
„manufacturer“: ,
„vendor“ : ,
„options“ : ,
„properties“ :
}
}
And the errors obtained from the response: „An exception occurred while executing ‚SELECT product
.id
FROM product
LEFT JOIN product
product.parent
ON product
.parent_id
= product.parent
.id
AND product
.version_id
= product.parent
.version_id
LEFT JOIN product_visibility
product.visibilities
ON product
.visibilities
= product.visibilities
.product_id
AND product
.version_id = product.visibilities
.product_version_id WHERE (product
.version_id
= ?) AND ((product
.calculated_price
LIKE ? AND ((product.visibilities
.visibility
>= ?) AND product.visibilities
.sales_channel_id
<=> ? AND IFNULL(product
.active
, product.parent
.active
) <=> ?))) GROUP BY product
.id
ORDER BY MAX(product
.created_at
) DESC, LENGTH(product
.product_number
) ASC, MIN(product
.product_number
) ASC LIMIT 163‘ with params [“\x0f\xa9\x1c\xe3\xe9\x6a\x4b\xc2\xbe\x4b\xd9\xce\x75\x2c\x34\x25", „%17%“, 10, „\x86\x38\x0e\x56\x36\xae\x40\xbf\xaf\xb1\x5d\x18\x07\xe5\xe1\x24“, true]:\n\nSQLSTATE[42S22]: Column not found: 1054 Unknown column ‚product.calculated_price‘ in ‚where clause‘".
Any configurations/parameters are missing there? Your advice is much appreciated. Thank you.
Best regards,
Leng