Skip to content

Product doesn't show on website when adding it with REST #1720

Closed
@rklerck

Description

@rklerck

We're trying to load our categories and products through REST. Everything is added nicely and is visible in the backend, but it doesn't appear on the website. The option "Display Out of Stock Products" is put on "Yes".

After saving the product in the admin OR re-enabling it in the admin, it does show up!

Steps to reproduce:

  • Add category (REST or admin, doesn't matter)
  • Add product with REST:

url: magento2/rest/V1/products

{
"product": {
"sku": "TEST",
"name": "TEST",
"visibility": 4,
"type_id": "simple",
"price": 3.62,
"status": 1,
"attribute_set_id": 4,
"custom_attributes": [
{
"attribute_code": "description",
"value": "TEST"
}
]
}
}

  • Add product link with REST:

url: magento2/rest/V1/categories/[CATEGORY_ID]/products

{
"productLink": {
"sku": "TEST",
"category_id": [CATEGORY_ID]
}
}

After there steps the product is NOT visible on the website!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions