Ojread2's post isn't entirely correct.
The right to a REFUND (rather than to a repair or exchange), in respect of faulty goods, only exists up until the purchaser has legally 'accepted' the product. The length of the 'pre-acceptance' period, isn't defined in law. For many items it might only be a day or two (i.e. just long enough for the purchaser to get the item home and check that everything seems to be working properly) but for others it can be much longer. (A court has ruled that when a customer purchased a new car during the winter months they still hadn't legally accepted it when they later found out, in the summer, that the air conditioning didn't work).
The phone shop has suggested (on the receipt) that 7 days is a reasonable 'pre-acceptance' period, giving the purchaser enough time to check that the phone is fully working. A court would probably rule that to be a reasonable period (although if the phone had never worked during that 7-day period the purchaser would never have 'accepted' the phone and the 'pre-acceptance' period would then run indefinitely).
Once a purchaser has 'accepted' a product, they lose the right to a REFUND if it then develops a fault. However, as Ojread2 indicates, any problem which develops during the first 6 months after purchase is normally deemed to have come about due to an 'inherent fault' (i.e.something which was wrong at the time of purchase). Under those circumstances the purchaser has the right to a repair or replacement (but NOT to a refund). The purchaser can indicate which of those two options he prefers but the retailer may substitute the alternative option if the customer's preferred solution is not economically viable.
All of the above refers to a purchaser's statutory rights, which are entirely separate to any warranty offered by the retailer or (more usually) by the manufacturer. Such a warranty is legally a 'gift' and can be as generous or as restricted as the firm offering the warranty chooses. (For example, a warranty can state that a replacement product will be provided but only if you take your purchase back, in person, to the factory in China at 3am on the third Tuesday in the month, while hopping on one foot stark naked and singing the Peruvian national anthem backwards. Such a warranty would be perfectly legal as long as it didn't seek to void the statutory rights referred to above).
Chris