I want to apply GST according to Product unit price and in case discount is applied hence GST is calculated on discounted amount. For Intrastate(with in the state):

if unit price + discount < Rs1000 : 5% (2.5% CGST + 2.5% SGST)

if unit price + discount > Rs1000 : 12% (6% CGST + 6% SGST)

For Interstate:

if unit price + discount <1000 : 5% (IGST)

if unit price + discount >1000 : 12% (IGST) enter image description here

Thanks in advance:)

  • This extension has the feature you are looking for magecomp.com/magento-indian-gst.html Commented Aug 21, 2017 at 11:48
  • Hi, my simple solution, hire PHP developer, they give a complete solution. This is your payment related stuff, be aware.
    – Gem
    Commented Apr 30, 2018 at 11:20
  • @user00247 did you get a solution for this? i have also a same requirement
    – amith lal
    Commented May 10, 2019 at 4:56

4 Answers 4


Please check this blog

Try to edit the logic as per your need. Create system config values in admin panel for CGST, SGST, IGST percentage values. Get those inside the collect function and calculate the tax and modify the total.


Credits : Magecomp link

To bifurcate GST taxes to show separately in all the order related documents, go to

go to and copy app\design\frontend\base\default\template\tax\order\tax.phtml

<?php if ($isFirst): ?>
                <td <?php echo $this->getValueProperties()?> rowspan=" 1 <?php echo count($rates); ?>">
                    <?php echo $_order->formatPrice($amount); ?>
            <?php endif; ?>

and paste at app\design\frontend\[theme_package]\template\tax\order And replace code as shown below:

<?php //if ($isFirst): ?>
                <td <?php echo $this->getValueProperties()?> rowspan=" 1 <?php //echo count($rates); ?>">
                    <?php echo $_order->formatPrice($amount / ($percent/(float)$rate['percent']) ); ?>
            <?php //endif; ?>

Now you can see you can see the detailed tax charges with the bifurcation of SGST and CGST taxes in cart, checkout, invoice, credit memo, shipment, my account order view and Emails.

Result :

enter image description here


$itemAfterDiscountPrice= ($item->getPrice() * $item->getDiscountPercent())/100 ; $prdPrice=$item->getPrice()-$itemPriceAfterDiscount;

You can get after discount price in this way and set condition as per your requirement.


Hi I have tried the same but Not getting the result with SGST and CGST separately and the template file is


Not the answer you're looking for? Browse other questions tagged or ask your own question.