How to get discount value round up in magentoHow to Round off Discount price?Shopping cart price rule applied at Grand total (or subtotal after discount)Maximum discount percent magentoMagento apply discount couponsBuy 2 of same item (no need to color match) and Get 1 of them 50% OffGrand Total not updated when discount code is appliedPercentage of Discount based on the Cart Subtotal?How to give discount from Shipping price in magento?Discount from Specific Shipping Method based on coupon code in MagentoMagento 1.9.x Discounts deducted from Excl. Tax Price even when Including Tax is set in Apply Discount On Prices SettingsRound a total tax price

Which is the better way to call a method that is only available to one class that implements an interface but not the other one?

Someone whose aspirations exceed abilities or means

Creating an Output vs. snipping tool

Should I put programming books I wrote a few years ago on my resume?

Why not invest in precious metals?

Printing Pascal’s triangle for n number of rows in Python

How can I make 12 tone and atonal melodies sound interesting?

Why Does Mama Coco Look Old After Going to the Other World?

What is exactly Avijja -- and how to uproot it?

bash does not know the letter 'p'

Does the new finding on "reversing a quantum jump mid-flight" rule out any interpretations of QM?

How to you show a 3-center 2-electron bond in a Lewis structure?

Why was this person allowed to become Grand Maester?

Is there a DSLR/mirorless camera with minimal options like a classic, simple SLR?

Teaching a class likely meant to inflate the GPA of student athletes

With Ubuntu 18.04, how can I have a hot corner that locks the computer?

Can a human be transformed into a Mind Flayer?

What are some really overused phrases in French that are common nowadays?

Why am I Seeing A Weird "Notch" on the Data Line For Some Logical 1s?

Is using 'echo' to display attacker-controlled data on the terminal dangerous?

Can the removal of a duty-free sales trolley result in a measurable reduction in emissions?

How to safely destroy (a large quantity of) valid checks?

Advantages of the Exponential Family: why should we study it and use it?

Is it possible for a vehicle to be manufactured without a catalytic converter?



How to get discount value round up in magento


How to Round off Discount price?Shopping cart price rule applied at Grand total (or subtotal after discount)Maximum discount percent magentoMagento apply discount couponsBuy 2 of same item (no need to color match) and Get 1 of them 50% OffGrand Total not updated when discount code is appliedPercentage of Discount based on the Cart Subtotal?How to give discount from Shipping price in magento?Discount from Specific Shipping Method based on coupon code in MagentoMagento 1.9.x Discounts deducted from Excl. Tax Price even when Including Tax is set in Apply Discount On Prices SettingsRound a total tax price






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I need to show round value of discount coupon, like if i have apply 10% discount on cart and after apply if 99.90 value is deducted from subtotal then if need to show 99.90 value round off and then deduct price from subtotal.
Is this possible to round off only discount price on cart?










share|improve this question






















  • have you solved it ?

    – lalit mohan
    Jan 4 '17 at 9:03











  • magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 7 '17 at 7:13











  • i solved it magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 24 '17 at 9:12

















1















I need to show round value of discount coupon, like if i have apply 10% discount on cart and after apply if 99.90 value is deducted from subtotal then if need to show 99.90 value round off and then deduct price from subtotal.
Is this possible to round off only discount price on cart?










share|improve this question






















  • have you solved it ?

    – lalit mohan
    Jan 4 '17 at 9:03











  • magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 7 '17 at 7:13











  • i solved it magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 24 '17 at 9:12













1












1








1


1






I need to show round value of discount coupon, like if i have apply 10% discount on cart and after apply if 99.90 value is deducted from subtotal then if need to show 99.90 value round off and then deduct price from subtotal.
Is this possible to round off only discount price on cart?










share|improve this question














I need to show round value of discount coupon, like if i have apply 10% discount on cart and after apply if 99.90 value is deducted from subtotal then if need to show 99.90 value round off and then deduct price from subtotal.
Is this possible to round off only discount price on cart?







magento-1.9 shopping-cart-price-rules shopping-cart






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 19 '16 at 13:14









Mace LongMace Long

561213




561213












  • have you solved it ?

    – lalit mohan
    Jan 4 '17 at 9:03











  • magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 7 '17 at 7:13











  • i solved it magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 24 '17 at 9:12

















  • have you solved it ?

    – lalit mohan
    Jan 4 '17 at 9:03











  • magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 7 '17 at 7:13











  • i solved it magento.stackexchange.com/questions/153098/…

    – lalit mohan
    Jan 24 '17 at 9:12
















have you solved it ?

– lalit mohan
Jan 4 '17 at 9:03





have you solved it ?

– lalit mohan
Jan 4 '17 at 9:03













magento.stackexchange.com/questions/153098/…

– lalit mohan
Jan 7 '17 at 7:13





magento.stackexchange.com/questions/153098/…

– lalit mohan
Jan 7 '17 at 7:13













i solved it magento.stackexchange.com/questions/153098/…

– lalit mohan
Jan 24 '17 at 9:12





i solved it magento.stackexchange.com/questions/153098/…

– lalit mohan
Jan 24 '17 at 9:12










2 Answers
2






active

oldest

votes


















0














copy these file from core to local folder from app/code/core/Mage/SalesRule/Model/Quote/Discount.php. with same folder structure..



find this function



 public function fetch(Mage_Sales_Model_Quote_Address $address)

$amount = round($address->getDiscountAmount()); /* round up value */

if ($amount != 0)
$description = $address->getDiscountDescription();
if (strlen($description))
$title = Mage::helper('sales')->__('Discount (%s)', $description);
else
$title = Mage::helper('sales')->__('Discount');

$address->addTotal(array(
'code' => $this->getCode(),
'title' => $title,
'value' => $amount
));

return $this;



change



 $amount = $address->getDiscountAmount();


to



$amount = round($address->getDiscountAmount());





share|improve this answer























  • This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

    – micwallace
    Dec 18 '17 at 1:48











  • it's round up the discount values only

    – lalit mohan
    Dec 18 '17 at 18:37


















0














Here you go..



Edit or copy to local folder




app/code/core/Mage/Core/Model/Store.php




public function roundPrice($price)

return round($price, 0);



Change return round($price, 2); to return round($price, 0);



This resolved my issue






share|improve this answer























    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "479"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f116117%2fhow-to-get-discount-value-round-up-in-magento%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    copy these file from core to local folder from app/code/core/Mage/SalesRule/Model/Quote/Discount.php. with same folder structure..



    find this function



     public function fetch(Mage_Sales_Model_Quote_Address $address)

    $amount = round($address->getDiscountAmount()); /* round up value */

    if ($amount != 0)
    $description = $address->getDiscountDescription();
    if (strlen($description))
    $title = Mage::helper('sales')->__('Discount (%s)', $description);
    else
    $title = Mage::helper('sales')->__('Discount');

    $address->addTotal(array(
    'code' => $this->getCode(),
    'title' => $title,
    'value' => $amount
    ));

    return $this;



    change



     $amount = $address->getDiscountAmount();


    to



    $amount = round($address->getDiscountAmount());





    share|improve this answer























    • This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

      – micwallace
      Dec 18 '17 at 1:48











    • it's round up the discount values only

      – lalit mohan
      Dec 18 '17 at 18:37















    0














    copy these file from core to local folder from app/code/core/Mage/SalesRule/Model/Quote/Discount.php. with same folder structure..



    find this function



     public function fetch(Mage_Sales_Model_Quote_Address $address)

    $amount = round($address->getDiscountAmount()); /* round up value */

    if ($amount != 0)
    $description = $address->getDiscountDescription();
    if (strlen($description))
    $title = Mage::helper('sales')->__('Discount (%s)', $description);
    else
    $title = Mage::helper('sales')->__('Discount');

    $address->addTotal(array(
    'code' => $this->getCode(),
    'title' => $title,
    'value' => $amount
    ));

    return $this;



    change



     $amount = $address->getDiscountAmount();


    to



    $amount = round($address->getDiscountAmount());





    share|improve this answer























    • This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

      – micwallace
      Dec 18 '17 at 1:48











    • it's round up the discount values only

      – lalit mohan
      Dec 18 '17 at 18:37













    0












    0








    0







    copy these file from core to local folder from app/code/core/Mage/SalesRule/Model/Quote/Discount.php. with same folder structure..



    find this function



     public function fetch(Mage_Sales_Model_Quote_Address $address)

    $amount = round($address->getDiscountAmount()); /* round up value */

    if ($amount != 0)
    $description = $address->getDiscountDescription();
    if (strlen($description))
    $title = Mage::helper('sales')->__('Discount (%s)', $description);
    else
    $title = Mage::helper('sales')->__('Discount');

    $address->addTotal(array(
    'code' => $this->getCode(),
    'title' => $title,
    'value' => $amount
    ));

    return $this;



    change



     $amount = $address->getDiscountAmount();


    to



    $amount = round($address->getDiscountAmount());





    share|improve this answer













    copy these file from core to local folder from app/code/core/Mage/SalesRule/Model/Quote/Discount.php. with same folder structure..



    find this function



     public function fetch(Mage_Sales_Model_Quote_Address $address)

    $amount = round($address->getDiscountAmount()); /* round up value */

    if ($amount != 0)
    $description = $address->getDiscountDescription();
    if (strlen($description))
    $title = Mage::helper('sales')->__('Discount (%s)', $description);
    else
    $title = Mage::helper('sales')->__('Discount');

    $address->addTotal(array(
    'code' => $this->getCode(),
    'title' => $title,
    'value' => $amount
    ));

    return $this;



    change



     $amount = $address->getDiscountAmount();


    to



    $amount = round($address->getDiscountAmount());






    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 24 '17 at 9:21









    lalit mohanlalit mohan

    742629




    742629












    • This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

      – micwallace
      Dec 18 '17 at 1:48











    • it's round up the discount values only

      – lalit mohan
      Dec 18 '17 at 18:37

















    • This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

      – micwallace
      Dec 18 '17 at 1:48











    • it's round up the discount values only

      – lalit mohan
      Dec 18 '17 at 18:37
















    This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

    – micwallace
    Dec 18 '17 at 1:48





    This only seems to effect how the discount is displayed. The grand total remains the same, as if it has been calculated using the non-rounded amount.

    – micwallace
    Dec 18 '17 at 1:48













    it's round up the discount values only

    – lalit mohan
    Dec 18 '17 at 18:37





    it's round up the discount values only

    – lalit mohan
    Dec 18 '17 at 18:37













    0














    Here you go..



    Edit or copy to local folder




    app/code/core/Mage/Core/Model/Store.php




    public function roundPrice($price)

    return round($price, 0);



    Change return round($price, 2); to return round($price, 0);



    This resolved my issue






    share|improve this answer



























      0














      Here you go..



      Edit or copy to local folder




      app/code/core/Mage/Core/Model/Store.php




      public function roundPrice($price)

      return round($price, 0);



      Change return round($price, 2); to return round($price, 0);



      This resolved my issue






      share|improve this answer

























        0












        0








        0







        Here you go..



        Edit or copy to local folder




        app/code/core/Mage/Core/Model/Store.php




        public function roundPrice($price)

        return round($price, 0);



        Change return round($price, 2); to return round($price, 0);



        This resolved my issue






        share|improve this answer













        Here you go..



        Edit or copy to local folder




        app/code/core/Mage/Core/Model/Store.php




        public function roundPrice($price)

        return round($price, 0);



        Change return round($price, 2); to return round($price, 0);



        This resolved my issue







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Oct 7 '18 at 8:32









        user62618user62618

        1




        1



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Magento Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f116117%2fhow-to-get-discount-value-round-up-in-magento%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

            Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

            Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림