Fixed invalid foreach for discounts sshort code. #1231