Laravel collection, get products sold until current row with pagination

I'm trying to create an order panel containing the sold products for each order. Next to the name of the item i'm also showing the current inventory for that product and the quantity sold [e.g. Product 007 (0/2)]

This is my current query which retrieves all incomplete orders by scope and orders them by priority,

$orders = Order::incomplete()
        ->orderByRaw("shipping_method='EMS (Express) Shipping' DESC, shipping_method='Standard Air Registered' DESC, purchase_date ASC")
        ->paginate(100)
        ->appends(request()->except('page'));

By setting a Many to Many relationship between Orders and Products, each order's products can be accessed by $order->products. Each product also has an inventory quantity and a sold quantity inside the pivot table which can both be accessed with $product->inventory and $product->pivot->sold_quantity if looped inside a foreach.

Now, let's say I have something like the image below,

Order Panel Image

What I would like to do is turn the 3rd item to a red color instead, because although the inventory is available, it cannot be shipped due to low priority.

I have tried creating a new collection with product ids as key and sum, however, this method does not work with pagination since only 100 items are looped through.

$collection = collect([]);

        $orders->map(function ($order) use($collection){

            foreach($order->products as $key => $product){

                $collection->put($product->id,($collection->get($product->id)+$product->pivot->sold_quantity));
                $order['products'][$key]['sold_until_now'] = $collection->get($product->id);

            }

            return $order;
        });

What I do after this is compare the "sold_until_now" attribute in laravel view to the current inventory and change color.

However, let's say we have 1000 active orders containing the same items but in different pages, when changing page the "sold_until_now" count is reset.

I think I have run out of ideas and, within my capabilities, i'm unable to do this functionality. Do you guys have any ideas as how this can be done or if it can be done at all with pagination? Maybe I'm thinking the wrong way and this should be done in some other way? Any help or direction to look into would be greatly appreciated.

Thank you for your help.