Order price, cost, rebate set to 0 after setting payment status
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Order price, cost, rebate set to 0 after setting payment status
Code: Select all
$manager = MShop::create($context, 'order');
$order = $manager->get($orderId);
$order->setStatusPayment(4)
Before:
Code: Select all
"order.price": "450.00",
"order.costs": "55.00",
"order.rebate": "0.00",
Code: Select all
"order.price" => "0.00"
"order.costs" => "0.00"
"order.rebate" => "0.00"
Version:
"aimeos/aimeos-laravel": "~2023.10",
"php": "^8.1.0",
Re: Order price, cost, rebate set to 0 after setting payment status
Add "->off()" to the order item to avoid the basket plugins to modify the order if you change something:
Code: Select all
$manager = MShop::create($context, 'order');
$order = $manager->get($orderId)->off();
$order->setStatusPayment(4);
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Order price, cost, rebate set to 0 after setting payment status
Order price is still set to 0 after this change.
This is the payment status and order total before payment intent was created (custom controller). This is after the payment intent was created. The problem doesn't happen if I manually change the payment status in jqadm platform, but when I call in backend,
all the prices will be set to 0.
The entire code is as follows:
I think there's problem on function setStatusPayment, or manager->save(), but I'm not sure how to proceed, thanks!
This is the payment status and order total before payment intent was created (custom controller). This is after the payment intent was created. The problem doesn't happen if I manually change the payment status in jqadm platform, but when I call
Code: Select all
$order->setStatusPayment(4);
$manager->save($order);
all the prices will be set to 0.
The entire code is as follows:
Code: Select all
$context = app('aimeos.context')->get();
$manager = MShop::create($context, 'order');
$order = $manager->get($orderId)->off();
$order->setStatusPayment(4); // set pending status
$manager->save($order);
Re: Order price, cost, rebate set to 0 after setting payment status
Payment status is set here:
https://github.com/aimeos/aimeos-core/b ... d.php#L241
Saving the item is done there:
https://github.com/aimeos/aimeos-core/b ... d.php#L615
There's no code executed with sets the price of the order to 0.00. Can you check what happens in that methods in your case?
https://github.com/aimeos/aimeos-core/b ... d.php#L241
Saving the item is done there:
https://github.com/aimeos/aimeos-core/b ... d.php#L615
There's no code executed with sets the price of the order to 0.00. Can you check what happens in that methods in your case?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
