This addOn automatically stacks and sorts your items.

Alt text

Video demonstration (The minimap button is from an older version)


/cleanupbags (starts button placement mode)<br/> /cleanupbank (starts button placement mode)

Button placement mode

Use the mouse wheel to iterate through the visible frames to choose a parent for the button. When holding down ctrl the mouse wheel will resize the button instead. Finally click to place the button.

Sort order

The highest priority is to fill special bags (e.g., herb bag) with fitting items.

Besides that, the primary sort order is:

hearthstone<br/> mounts<br/> special items (items of arbitrary categories that tend to be kept for a long time for some reason. e.g., cosmetic items like dartol's rod, items that give you some ability like cenarion beacon)<br/> key items (keys that aren't actual keys. e.g., mara scepter, zf hammer, ubrs key)<br/> tools<br/> other soulbound items<br/> reagents<br/> consumables<br/> quest items<br/> high quality items (which aren't in any other category)<br/> enchanting materials<br/> herbs<br/> common quality items (which aren't in any other category)<br/> junk<br/> soul shards<br/> conjured items

The basic intuition for the primary sort order is how long items are expected to be kept around. The more "permanent" an item is the lower it is placed in your bags.

Within the primary groups items are further sorted by itemclass, itemequiploc, itemsubclass, itemname and stacksize/charges in this order of priority.