Skip to content

Conversation

alozytskyi
Copy link

No description provided.

@hippoduck
Copy link

hippoduck commented May 14, 2018

This is exactly what I need.

@KiloooNL
Copy link

An example of how this new API request works would be super helpful too. I'm pulling my hair out getting around this Inventory management change.

@ghost
Copy link

ghost commented May 28, 2018

@KiloooNL see the links to their docs in updated readme. SDK maps directly to the underlying resources exactly like they describe. Pay attention to the data required by Levels resources like set.

@ghost
Copy link

ghost commented May 28, 2018

For example, to set inventory levels(you need to get all ids beforehand using other APIs)

$variant = $sdk->Product('<shopify product id>') ->Variant('<shopify variant id>') ->get(); $levels = $sdk->InventoryLevel->get(['inventory_item_ids' => $variant['inventory_item_id']]); $sdk->InventoryLevel->set([ 'inventory_item_id' => $variant['inventory_item_id'], 'location_id' => $levels[0]['location_id'], 'available' => 50, ]);
@tareqtms
Copy link
Contributor

tareqtms commented Jun 2, 2018

@alozytskyi Thanks for this. I am merging only the first commit. For the second part, I will fix it by not wrapping for all custom actions.

@tareqtms tareqtms merged commit 70eeeb2 into phpclassic:master Jun 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants