'If an item removed from shopping cart then we will remove
the corresponding redemption info of coupon code'

@classmethod
def remove_code_redemption_from_item(cls, item, user):

    order_item_course_id = item.course_id
    try:
        coupon_redemption = cls.objects.get(user=user, coupon__course_id=(order_item_course_id if order_item_course_id else CourseKeyField.Empty), order=item.order_id)
        coupon_redemption.delete()
        log.info(u'Coupon    "%s"    redemption    entry    removed    for    user    "%s"    for    order    item    "%s"', coupon_redemption.coupon.code, user, str(item.id))
    except CouponRedemption.DoesNotExist:
        log.debug(u'Code    redemption    does    not    exist    for    order    item    id=%s.', str(item.id))
