First: this part of the rules is completely optional (more so than normal, I mean); you can simply choose the items you want. They are literally guidelines, not rules, and they're there to help you, not confuse you.
That said, this is the procedure laid out in the book.
- Any item below the base value (8000 gp for a large city) is 75% likely to be available somewhere in the area. You don't check this ahead of time, but when a player asks if they can find an item.
- In addition, there are some number of minor, medium, and major magic items definitely available. As you've correctly noted, if you get a 7 on the first roll, you then roll 7 times on the minor magic items table, and then roll on the appropriate sub-table for each result.
- In many cases this won't have determined the exact item.
- Scrolls and wands can be made of any spell (of the correct level) -- just choose one by whatever means you like.
- Potions can be made of any spell that fits certain criteria (read the potion creation rules); a good rule of thumb is that if it's a buff you can cast on someone else, it makes a good potion. (Like cure light wounds, enlarge person, or bull's strength. But not true strike, because you can only cast that spell on yourself.) Since they're a bit more complicated, you could use the old 3.5 table, though it'll be missing some pathfinder spells.
- Armor and weapons you could choose yourself, or again, use the old tables for armor or weapons.
- Once you've done all this, you split the items amongst all the shops in the area. This is for the entire city, not just one magic shop.
Why does it matter?
It doesn't, really. The rules are written under the assumption that the players can have any item they can afford, so if you're new to DMing just stick to party wealth guidelines and consider letting the players have anything they want.
So don't let these rules prevent the party from getting healing potions or armor of the correct type unless that's what you want!
These limits on items are meant to create a sense of verisimilitude; the idea that there really are a finite amount of notable items for sale. This is probably best used in very small areas; in a large city it's more believable that you can find about anything. If you feel it's important, certainly try the rules out! But it's probably not how most people play the game. Generally either everything is available, or the DM restricts things based on narrative reasons.