Stock is not decrease

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
User avatar
Muhammad-Nawlo
Posts: 20
Joined: 16 Jul 2024, 02:03

Stock is not decrease

Post by Muhammad-Nawlo » 01 Jan 2025, 22:17

PHP:8.1
aimeos-site:2024.10
aimeos-laravel:2024.10
aimeos-core:2024.10
Hey, How are you doing?
I want to ask you about stock.
My stock is not decreamenting when the order payment status change to authorized (I changed manually).
I tried to clear cache,run jobs (order/service/async),check the database which updated
But the stock was not decrease.
I am using Cash on delivery for payment and custom delivery that has fixed price only (there is no api)

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Stock is not decrease

Post by aimeos » 02 Jan 2025, 14:56

You are right, stock level is currently not decreased if you set the payment status of an order to "authorized" manually in the admin backend. We will see how we can implement that safely.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
Muhammad-Nawlo
Posts: 20
Joined: 16 Jul 2024, 02:03

Re: Stock is not decrease

Post by Muhammad-Nawlo » 03 Jan 2025, 11:09

I implement a webhook for my payment gateway
Cause I use nextjs as frontend and laravel aimeos as backend
How can I update status of order and decrease the stock

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Stock is not decrease

Post by aimeos » 06 Jan 2025, 15:14

When changing the payment status in the admin backend or from the web hook?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

User avatar
Muhammad-Nawlo
Posts: 20
Joined: 16 Jul 2024, 02:03

Re: Stock is not decrease

Post by Muhammad-Nawlo » 06 Jan 2025, 18:35

I want to implement both

User avatar
aimeos
Administrator
Posts: 8616
Joined: 01 Jan 1970, 00:00

Re: Stock is not decrease

Post by aimeos » 08 Jan 2025, 13:20

The order manager has an update() method which accepts the order item. It will update stock levels based on the payment status: https://github.com/aimeos/aimeos-core/b ... e.php#L101
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply