[#209]Remove the duplicate code to deal with the variants products