[FIX] product_variant_default_code: Fixed some problems and enhance code