You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I trust this message finds you well. I've recently integrated the Signifly/Shopify app, and while most functionalities are working smoothly, I'm facing a challenge regarding inventory management.
Specifically, I need guidance on updating inventory quantities without the need to create a new inventory level and location. It seems that the current process involves these steps, but I'm wondering if there's a more direct method or if this feature will be considered in future updates.
The text was updated successfully, but these errors were encountered:
I'm not part of the Signifly support, but I've worked on inventory changes recently. This can be done using the adjustInventoryLevel function. You'll need
some specific information about the product variant that you're updating
the Shopify id of the location where you're updating the inventory
the stock adjustment
Note that you can't just set the inventory level, Shopify simply doesn't allow it. You have to adjust it.
So for example
// the Shopify ID for the location$locationId = 1321312312;
// whatever you want the stock level to be$desiredStock = 100;
// get the variant resource data, using the variant's Shopify ID$variantResource = $this->shopify->getVariant(12313232);
$variantAttributes = $variantResource->getAttributes();
// get the current inventory level in Shopify$inventoryQuantity = $variantAttributes["inventory_quantity"];
// calculate the adjustment required$stockAdjustment = $desiredStock - $inventoryQuantity;
$this->shopify->adjustInventoryLevel($variantAttributes["inventory_item_id"], $locationId, $stockAdjustment);
If you're just adjusting it (e.g. adding 20), you can simplify that a bit and just set the (e.g. 20) to the last parameter. If you're reducing stock, just pass the negative value to adjust by.
Hello Signifly Support,
I trust this message finds you well. I've recently integrated the Signifly/Shopify app, and while most functionalities are working smoothly, I'm facing a challenge regarding inventory management.
Specifically, I need guidance on updating inventory quantities without the need to create a new inventory level and location. It seems that the current process involves these steps, but I'm wondering if there's a more direct method or if this feature will be considered in future updates.
The text was updated successfully, but these errors were encountered: