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;
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
add a comment |
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
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
add a comment |
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
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
magento-1.9 shopping-cart-price-rules shopping-cart
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
add a comment |
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
add a comment |
2 Answers
2
active
oldest
votes
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());
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
add a comment |
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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());
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
add a comment |
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());
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
add a comment |
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());
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());
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
add a comment |
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
add a comment |
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
add a comment |
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
add a comment |
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
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
answered Oct 7 '18 at 8:32
user62618user62618
1
1
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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