2

I would like to change the order of the Capture Payment dropdown, it is located on the create invoice page in admin html when you chose a payment that allows capturing.

The order of the list is:

  • Capture Online
  • Capture Offline
  • Don't Capture

I would like the Don't capture option to be on top. Does anybody have an idea what file I should rewrite?

2

You will have to overwrite the template.

Create local.xml in design/adminhtml/default/default/layout folder and add this:

<?xml version="1.0"?>

<layout>
  <adminhtml_sales_order_invoice_new>
    <reference name="order_items">
       <action method="setTemplate">
          <template>sales/order/invoice/create/items_new.phtml</template>
       </action>
    </reference>
  </adminhtml_sales_order_invoice_new>
</layout>

Now create another file in design/adminhtml/default/default/template/sales/order/invoice/create/items_new.phtml.

copy all the content from design/adminhtml/default/default/template/sales/order/invoice/create/items.phtml to your file and then find following:

         <select name="invoice[capture_case]">
                  <option value="online"><?php echo Mage::helper('sales')->__('Capture Online') ?></option>
                  <option value="offline"><?php echo Mage::helper('sales')->__('Capture Offline') ?></option>
                  <option value="not_capture"><?php echo Mage::helper('sales')->__('Not Capture') ?></option>
              </select>

and replace that with:

          <select name="invoice[capture_case]">
                  <option value="not_capture"><?php echo Mage::helper('sales')->__('Not Capture') ?></option>
                  <option value="online"><?php echo Mage::helper('sales')->__('Capture Online') ?></option>
                  <option value="offline"><?php echo Mage::helper('sales')->__('Capture Offline') ?></option>
              </select>

This should work. Good luck.

0

That dropdown is hardcoded in an adminhtml template so it doesn't use a source model. What you can do is to overwrite the template app/design/adminhtml/default/default/template/sales/order/invoice/create/items.phtml, more precisely this part:

              <select name="invoice[capture_case]">
                  <option value="online"><?php echo Mage::helper('sales')->__('Capture Online') ?></option>
                  <option value="offline"><?php echo Mage::helper('sales')->__('Capture Offline') ?></option>
                  <option value="not_capture"><?php echo Mage::helper('sales')->__('Not Capture') ?></option>
              </select>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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