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

updateInventory fails with multiple values in price_on_property, quantity_on_property, and sku_on_property #59

Open
geewhzz opened this issue Nov 16, 2020 · 0 comments

Comments

@geewhzz
Copy link

geewhzz commented Nov 16, 2020

This drove me crazy for a day.

from methods.json on updateInventory these must be changed from;

"price_on_property": "array(int)", "quantity_on_property": "array(int)", "sku_on_property": "array(int)"

to:

"price_on_property": "string", "quantity_on_property": "string", "sku_on_property": "string"

When submitting the request to Etsy, array(int) will only work with one value, but if you need to add another property_id such as array(int, int) it will fail. This was actually crashing my Apache server so it was rather hard to debug. On the Etsy documentation it asks for array(int) but a string will actually work just fine for one propert_id or two property_id's. ie;

$args = array( 'params' => array( 'listing_id' => $product['id_etsy'] ), 'data' => array( 'products' => json_encode( $ListingProducts ), 'price_on_property' => "100,200", 'quantity_on_property' => "100,200" ) );

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