Case 1: the shop shows the number
Colour, size, storage: the number of your variant.
Pick another colour or size in the shop and the number in the panel changes with it. You get the UPC, EAN or GTIN the shop lists for the variant you picked – not the one of the item next to it, and not the base version’s. If the shop itself lists a wrong number, the panel takes it over; before an important purchase, check the box or data sheet.