4

I have successfully created a customer order total Zero VAT Cylinder Deposit and have made it appear on the credit memo page. However, as you can see below, my only option is to refund the entire amount at once. I'd prefer it to be like the shipping with a text input where I can define the refund amount.

enter image description here

Can anyone offer any solutions or at least point me in the right direction of which files I need to examine to do this for my custom total?

I'll be putting the entire module on GitHub when it's finished which should help others.

-------------------- EDIT --------------------

I now have the input box showing up (below), however the refund amount is always the full amount regardless of the number I enter. If I enter a custom price and click 'Update Qtys' it reverts back to the original deposit total (the full amount).

enter image description here

My question now is if anybody knows how I can make Magento take notice of the custom price I might enter into the deposit field, instead of refunding the full deposit amount?

1
  • I have discovered Mage_Adminhtml_Block_Sales_Order_Creditmemo_Create_Adjustments and app/design/adminhtml/default/default/template/sales/order/creditmemo/create/totals/adjustments.phtml which seem to be the main objects and templates in this area of the site, I've scuessfully got the box to show up, but it still refunds the full amount.
    – Adam Moss
    Commented May 6, 2015 at 11:02

1 Answer 1

2

I managed to get this working with some painstaking updates using an observer on sales_order_creditmemo_save_after

https://github.com/adampmoss/magento-deposit-total/blob/master/app/code/local/Creare/Deposit/Model/Observer.php

I don't know if this is the best way of doing it but Magento was damn sure not going to allow it to be done easily! I've put the entire module on GitHub - feel free to fork.

1
  • If you do this way, what will happen if some other extension also wants to override the template .../create/tota‌​ls/adjustments.phtml ? Commented Jan 14, 2016 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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