discountrank based on magento 1.7.0.2