Skip to content

Product images not updating with replace operation in the PATCH #94

Description

@chrismshea

Issue

When updating products using the job productFeedSP images are not updating when current products do not contain an image. To get around this we can update the operation to add for the thumbnail_url in the PATCH request.

Solution

Send add as the operation instead of replace for the thumbnail_url path.

Example working PATCH

[
    {
        "op": "replace",
        "ids": [
            1332068
        ],
        "path": "/sku",
        "value": "monthly_service_444"
    },
    {
        "op": "replace",
        "ids": [
            1332068
        ],
        "path": "/name",
        "value": "Monthly Service"
    },
    {
        "op": "replace",
        "ids": [
            1332068
        ],
        "path": "/price",
        "value": "15"
    },
    {
        "op": "add",
        "ids": [
            1332068
        ],
        "path": "/thumbnail_url",
        "value": "https://zzvw-006.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-m-catalog/default/dw3e740b1a/images/small/test/fries.png"
    },
    {
        "op": "replace",
        "ids": [
            1332068
        ],
        "path": "/is_in_stock",
        "value": true
    }
]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions