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 do I edit the Admin > Order Details page? 
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

I need to edit the Payment Information box, so it does not show the Credit Card type or Expiration Date (for security reasons).

Looked in app > design > adminhtml > default > default > templates > sales > order > view > tab > info.php, but all I see is:

<!--Payment Method-->
        <
div class="entry-edit">
            <
div class="entry-edit-head">
                <
h4 class="icon-head head-payment-method"><?php echo Mage::helper('sales')->__('Payment Information'?></h4>
            </
div>
            <
fieldset>
                
<?php echo $this->getPaymentHtml() ?>
                
<div><?php echo Mage::helper('sales')->__('Order was placed using %s'$_order->getOrderCurrencyCode()) ?></div>
            </
fieldset>
        </
div>

How do I know where it’s pulling getPaymentHtml()?

 
Magento Community Magento Community
Magento Community
Magento Community
 
dan_w
Sr. Member
 
Total Posts:  290
Joined:  2008-01-04
 

Brady,
The function getPaymentHtml() is located in add->code->core->Made->Adminhtml->Block->Sales->Order->View->Tab->Info.php. The entire function is:
public function getPaymentHtml()
{
return $this->getChildHtml(’payment_info’);
}

For upgradability it would be best to override the function in the local code pool. This will essentially overide all payment info. However, it seems that for your scenario since you just want to hide the info from being seen, you should alter the template file associated with getChildHtml(’payment_info’) which is located in:
app > design > adminhtml > default > default > template >payment>info >cc.phtml.
This includes:
<!--<?php echo Mage::helper('payment')->__('Name on the Card: %s', $this->htmlEscape($this->getInfo()->getCcOwner())) ?><br/>-->
<?php echo Mage::helper('payment')->__('Credit Card Type: %s', $this->htmlEscape($this->getCcTypeName())) ?><br/>
<?php echo Mage::helper('payment')->__('Credit Card Number: xxxx-%s', $this->htmlEscape($this->getInfo()->getCcLast4())) ?><br/>
<?php echo Mage::helper('payment')->__('Expiration Date: %s/%s', $this->htmlEscape($this->getCcExpMonth()), $this->htmlEscape($this->getInfo()->getCcExpYear())) ?>

You can easily comment out the cc number and exp date and still keep the card type. Hope I didn’t confuse matters.

Dan

 
Magento Community Magento Community
Magento Community
Magento Community
 
Brady
Guru
 
Avatar
Total Posts:  330
Joined:  2007-09-10
Orange County, CA
 

Dan,

1) How the heck did you find those files?  confused

2) That’s very odd.  I modified that file a few days ago and did not see any change in the Admin.  Now it works perfectly!

Thank you so much!

Brady

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