Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chrismshea opened this issue Oct 30, 2024 · 0 comments
Open

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

chrismshea opened this issue Oct 30, 2024 · 0 comments

Comments

@chrismshea
Copy link
Contributor

chrismshea commented Oct 30, 2024

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
    }
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant