Shoppers who buy knives online will have to submit a photo ID at point of sale and again on delivery.