akeneo / magento2-connector-community

Akeneo Connector for Magento 2
Open Software License 3.0
81 stars 88 forks source link

What is the magento stock quantity attribute code? #582

Open ExperienceUK opened 2 years ago

ExperienceUK commented 2 years ago

I'm trying to update the stock quantity but magento always says stock quantity is 0

I have created a numeric attribute in Akeneo called 'qty' and added a qty value of say 20 on the product page in Akeneo

I have mapped this in the magento connector config attribute mapping as (akeneo) qty > (magento) qty but it wont update the stock level - do i need to map another value too or am i missing something?

oefterdal commented 2 years ago

@ExperienceUK As far as I know the connector hasn’t implemented stock and stock is not an attribute you can easily just map anymore in later Magento releases because of the new inventory implementation (MSI). If I was you I would implement an server less function that pass the stock data from Akeneo (if you have to have it there) and post it to /V1/inventory/source-items You could use Akeneo’s event api to call the server less function.

https://magento.redoc.ly/2.4.4-admin/tag/inventorysource-items#operation/inventoryApiSourceItemsSaveV1ExecutePost

https://api.akeneo.com/events-documentation/overview.html