Magento show discount in cart page even without applying a coupon

488 views Asked by At

In cart page we can see the discount row only if a customer add a coupon code(?). What I want to do is adding the discount as zero for every cart page even there is not any coupon code applied.

What I see:

Total (Inc VAT) £42.00

Subtotal (net) £35.00

Subtotal (Inc VAT) £42.00

VAT £7.00

What I want:

Discount £0.00

Total (Inc VAT) £42.00

Subtotal (net) £35.00

Subtotal (Inc VAT) £42.00

VAT £7.00

This is my design/.../template/checkout/total/default.phtml file for viewing discount with coupon code:

<tr>
<td colspan="<?php echo $this->getColspan(); ?>" style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
    <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
        <?php echo $this->escapeHtml($this->getTotal()->getTitle()); ?>
        <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
</td>
<td style="<?php echo $this->getTotal()->getStyle() ?>" class="a-right">
    <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?><strong><?php endif; ?>
        <?php echo $this->helper('checkout')->formatPrice($this->getTotal()->getValue()) ?>
        <?php if ($this->getRenderingArea() == $this->getTotal()->getArea()): ?></strong><?php endif; ?>
</td>

The problem I'm having is whenever cart page is loaded, this block won't load, unless there is coupon code applied, obviously. What I want to know is that is there any flag or controller for make the block appear even no coupon is applied so in above block I can check whether coupon is applied or not to customize the above view. Can you give me any suggestions?

PS: here coupons means shopping cart price rules.

0

There are 0 answers