@Radoje [UPDATE – Oct 8, 2025]
• Environment: PHP 8.2.29 • Laravel 11.44.2 • Marketplace 2.3.0_1 • Bagisto app on Laravel 11 • DB: MariaDB 10.6.23
• Channel (default/Balkan) is mapped to sources 1,2,5; seller-scoped stock in the active channel sums to 7
• Seller payload includes: product_id, quantity, seller_id, marketplace_seller_id, seller_product_id, inventory_source_id, vendor_id
• Route runs under ['web','channel','theme','locale','currency'] and passes a Product OBJECT
• Still getting “requested quantity is not available” from Marketplace/src/Cart.php:108; the cart remains empty in all variants we tried
Versions
PHP: 8.2.29 (Cloudways)
Laravel: 11.44.2
Bagisto app: on Laravel 11
Marketplace module: 2.3.0_1
DB: MariaDB 10.6.23
SQL confirmations
-- Seller stock visible in the active channel (returns 7) SELECT SUM(pi.qty) AS salable_qty_seller FROM product_inventories pi JOIN channel_inventory_sources cis ON cis.inventory_source_id = pi.inventory_source_id WHERE pi.product_id = 54 AND pi.vendor_id = 2 AND cis.channel_id = 1; -- Raw inventory row SELECT * FROM product_inventories WHERE product_id=54 AND vendor_id=2; /* -> (id=45, qty=7, product_id=54, vendor_id=2, inventory_source_id=5) */ -- Marketplace product row (approved/owner) SELECT * FROM marketplace_products WHERE product_id=54; /* -> (id=34, product_id=54, marketplace_seller_id=2, is_approved=1, is_owner=1) */ Route context // app/Providers/MpRouteServiceProvider.php Route::middleware(['web','channel','theme','locale','currency']) ->group(base_path('routes/mp.php')); Seller proxy (POST) — full seller payload // routes/mp.php (excerpt) Route::post('/mp-add-to-cart', function (Request $r, ProductRepository $products) { $p = $products->findOrFail((int) $r->input('product_id')); // Product OBJECT $data = $r->validate([ 'product_id'=>'required|integer','quantity'=>'nullable|integer|min:1', 'seller_id'=>'nullable|integer','seller_product_id'=>'nullable|integer', 'marketplace_seller_id'=>'nullable|integer','inventory_source_id'=>'nullable|integer', 'vendor_id'=>'nullable|integer', ]); $payload = ['quantity'=>(int)($data['quantity']??1)]; foreach (['seller_id','seller_product_id','marketplace_seller_id','inventory_source_id','vendor_id'] as $k) { if (!empty($data[$k])) $payload[$k]=(int)$data[$k]; } \Log::error('MP ADD payload', $payload); \Webkul\Checkout\Facades\Cart::addProduct($p, $payload); // Marketplace Cart return redirect('/checkout/cart'); }); Logged payload (from laravel.log) MP ADD payload {"quantity":1,"seller_id":2,"seller_product_id":34,"marketplace_seller_id":2,"inventory_source_id":5,"vendor_id":2} Behavior Calling the handler above raises: The requested quantity is not available, please try again later. (packages/Webkul/Marketplace/src/Cart.php:108) The cart stays empty (cart_items has no rows) in all variants we tried. Question (recap) What exact parameter/flag does this Marketplace build need at addProduct($product, $data) so that the Cart picks the seller stock (vendor_id=2 on inventory_source_id=5) in the active channel, instead of returning 0? We already submit: seller_product_id, marketplace_seller_id, vendor_id, inventory_source_id; the route runs under web, channel, theme, locale, currency. SQL confirms the seller’s stock in the channel is 7.