I made some changes to this script so it can restore configurable products too