bazar
bazar copied to clipboard
\Bazar\Events\CheckoutProcessed , not decrement quantity
- Bazar Version: last
- Laravel Version: 8.2
- PHP Version: 7.4
- Database Driver & Version: #
Description:
\Bazar\Events\CheckoutProcessed didn't decrement quantity, i make debug and find that when you checkout you make $item->buyable null, and then you call CheckoutProcessed that condition in CheckoutProcessed doesn't meet if (($model = $item->buyable) instanceof Stockable && $model->inventory->tracksQuantity()) {
Reproduce: Call Cart::checkout('cash'); and see if item quantity is decremented, you can see in photo after checkout everything is null, but you set null before call checkoutprocessed
