Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

how to add surcharge amount to order and invoice after return to checkout success page
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Hello forums !!
I am very new to the Magento E-commerce World and trying to explorer more and more in Magento.
Currently I am stuck with one problem that it need to be done in my first Magento Project.
I would like to know how this can be achieved, I am struggling with the problem from past 4-5 days.

Case:
I would like to add some extra amount say($2.5) to the total order amount and invoice amount.
Note: I would like to achieve this after the successful checkout i.e. when the user returns to the checkout success
page from the payment gateways(say after paying through paypal).

[It would be even better if we add some text like Surcharge Amount: $2.5 just above Grand Total section Block in Order details page and invoice details page(just in the same way as Shipping methods charge and tax amount are displayed), but not of much importance but if anybody knows then it’s obviously a plus point to know new things:).]

After searching I found some hints but don’t know whether they are 100% reliable or not.

1> Updating tax_amount = 2.5, base_tax_amount= 2.5 and updating the grand_total and base_grand_total field of table: sales_orders accordinly
But this approach is not good and also don’t know whether this method works perfectly or not.
2> overriding collectTotals() method of app/core/Mage/Sales/Models/Quote.php as like:

function collectTotals(){
..
$address->setGrandTotal($address->getGrandTotal() + 2.5);
$address->setBaseGrandTotal($address->getBaseGrandTotal() + 2.5);
..
}
and saving like
$this->collectTotals()->save();

I don’t know much about saving like this, Do this create new record or just updates with new value?

Please help how to achieve the solutions.
Any futher suggestions/hints would be great.
Thanks in advance.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Knock Knock Help Please smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Knock Knock Help Please :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Its really frustating when you dont get replied from the official forums.
is there anybody who can help on such topic?
anyway thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

anyway thanks… i think this topic should be closed wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Still no replies… what should i say ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

I think this thread is going to be long wink

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

uff so many posts.

 
Magento Community Magento Community
Magento Community
Magento Community
 
MagePsycho
Mentor
 
Avatar
Total Posts:  1702
Joined:  2009-06-23
 

Stay tuned.. i have found some solutions… still some works pending… I will release as free magento extension.
Anyway Thanks everybody.

 
Magento Community Magento Community
Magento Community
Magento Community
 
suricate
Sr. Member
 
Avatar
Total Posts:  129
Joined:  2009-06-25
Brazil
 

Hello, i’d like to contribute on that extension , I need this too, So what do you think?

 
Magento Community Magento Community
Magento Community
Magento Community
 
slimshock143
Jr. Member
 
Total Posts:  12
Joined:  2009-08-20
 

hello, did you fine a clue or work this things out?.. i want to help i want this module to.. please post something you discovered or files you change..  grin

 
Magento Community Magento Community
Magento Community
Magento Community
 
miked2004
Sr. Member
 
Avatar
Total Posts:  214
Joined:  2007-12-13
Atlanta, Georgia
 

Any Luck with this? Point in the right direction?

MagentoPycho is going to horde his info smile

I am also looking for something like this. I am planing on adding a convince fee on a per product basis. I will post any info I find.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PzSniper
Jr. Member
 
Total Posts:  10
Joined:  2008-04-11
 

Same problem here, need to add a tax on paypal buyers.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top