create updateProductVariant() method to remove duplicate code