Why only for groceries?
In the interest of keeping markets fair, it should be illegal across the board to change prices depending on who the customer is*. The price is the price, as it should be in a free and fair market.
*Though I think I'd still allow for rewards/loyalty card programs and coupons given to frequent customers and that sort of thing -- with the distinction being it's something that the customer explicitly opts in to. And a restriction that these programs can only ever lower prices, never raise them.