No known way to pass data between windows in seperate branches off root. Price selectors are seperated from all purchasing/selling windows
It MIGHT be possible to make preset quantity buttons for windows that already have a "Buy Quantity" button like the Merchant window.
Assuming that's possible... its still impossible to buy unstacked items in quantity. Identical items in different bag slots probably have different database identifiers that requires them to be addressed individually.