Hi, I'm trying to display the discount amount in the feed, rather then showing the total discounted price. I think I've found where the discount is calculated but I'm not sure how I should change this to just show the discount amount. Can anyone help?
if( $discount_info["has_discount"]) {
$undiscounted_price = $base_price;
switch( $discount_info["is_percent"] ) {
case 0:
// If we subtract discounts BEFORE tax
if( $this->params->get('discount_before_tax','yes') == 'yes' ) {
// and if our prices are shown with tax
if( $include_tax == 'yes') {
// then we add tax to the (untaxed) discount
$discount_info['amount'] += ($my_taxrate*$discount_info['amount']);
}
// but if our prices are shown without tax
// we just leave the (untaxed) discount amount as it is
}
// But, if we subtract discounts AFTER tax
// and if our prices are shown with tax
// we just leave the (untaxed) discount amount as it is
// but if prices are shown without tax
// we just leave the (untaxed) discount amount as it is
// even though this is not really a good combination of settings
$base_price -= $discount_info["amount"];
break;
case 1:
$base_price *= (100 - $discount_info["amount"])/100;
break;
}
}