Closed exemplari closed 2 years ago
OMG, this is not an API issue. The admin is displaying incorrectly.
/admin/default/jqadm/get/catalog/2?locale=en#product
This displays all products as enabled, even when they are disabled.
Filtering by promotions and enabled is showing incorrect.
https://aimeos.org/docs/latest/frontend/jsonapi/catalog/#get-products-by-category
I have several product with multiple catalog tags. They all have a Default category , some have Promotion type 'home' and some have promotion type of the category name. Some have both promotions of 'home' and category name.
curl -X GET '/jsonapi/product?site=default&filter%5Bf_listtype%5D=promotion&filter%5Bf_catid%5D=1'
This should retrieve the 'promotion' category of 'home' = 1.
{ "meta": { "total": 33, "prefix": null, "content-baseurl": "/aimeos"
I receive 33 result count, however there are 70+ items in home promotions category.
curl -X GET '/jsonapi/product?site=default&filter%5Bf_listtype%5D=promotion&filter%5Bf_catid%5D=2'
Promotions of type Category 2: I receive 0 results count, however there are 3 items in that category. According to the admin /admin/default/jqadm/get/catalog/2?locale=en#product > Filter by type promotion
/jsonapi/product?site=default&filter[f_listtype]=promotion&filter[f_catid]=3
Promotions of type Category 3. I receive 2 result count, my count is 8
The products are all enabled. I have stock quantity checks off. Ran php artisan aimeos:jobs "index/rebuild"
aimeos/ai-client-jsonapi 2021.07.x-dev 0c764ae
2021.07.x-dev 0c764ae
/jsonapi/product?site=default&sort=-ctime&include=attribute,media,price,price/property,product,product/property,text,catalog,supplier,stock&page[offset]=0&page[limit]=4&filter[f_catid]=2&filter[f_listtype]=promotion
{ "meta": { "total": 0, "prefix": null, "content-baseurl": "/aimeos
SELECT * FROM
mshop_index_catalog
WHEREcatid
LIKE '2' ANDlisttype
LIKE 'promotion'114 | 1. | 2 | promotion | 0 | 2021-09-29 05:56:39 142 | 1. | 2 | promotion | 0 | 2021-09-29 05:56:39 143 | 1. | 2 | promotion | 0 | 20
3 Items expected.
$filter from Aimeos\Controller\Frontend\Product\Standard function search