Product discount value refactoring

@OlegIlyenko @lauraluiz  please review soon.
What is this check doing?