Mr Dunne told Parliament that if manufacturers tried to replace the banned items with slightly different substitutes, they would be banned as well.
"When they bring a new product onto the market, we will be there to take it off," he said.
"These measures have arisen in response to understandable public concern...it is important Parliament sends a strong message."
National MP Paul Hutchison, chairman of Parliament's health select committee, said parents would be relieved.
"I've been surprised by the irresponsibility of many retailers in the way they will sell these products flagrantly in areas close to schools," he said.
"The manufacturers of these products are very cunning and ruthless and will stop at nothing to make money."
Labour supported the ban but was worried there was "wiggle room" for manufacturers to get substitute products on the market.
"There are still a lot of questions around response times and around how quickly new substances can be assessed," said Iain Lees-Galloway.
"The minister has taken too long to deal with the problem."
ACT voted against Mr Dunne's amendment after a proposal by Heather Roy to put an age restriction of 18 on the sale of the products was defeated.
Ms Roy said Parliament was going to ban products that were currently legally available, and adults should be able to make their own decisions.
The Greens also opposed the amendment.
"These products have been on the shelves for years and the urgency seems to be misplaced," said Kevin Hague.
"This hasn't been to a select committee and the public haven't had a chance to have their say."
The National Organisation for the Reform of Marijuana Laws (NORML) said the temporary ban would provide time for proper consideration of the Law Commission report.
"Low risk drugs like cannabis and party pills should be regulated, not banned," said NORML's acting president Phil Saxby.
"The huge popularity of party pills before they were banned is an indication that young people want access to safe, legal psychoactive drugs."
- NZPA