-
- alistek

-
Total Posts: 293
Joined: 2008-04-02
Normal, IL
|
Hello,
This is for anyone interested in changing the RSS New Order feed under the Orders section in the backend. I had need for simplicity sake to allow the RSS feed to be read with all the info, i.e. credit card, billing, shipping, etc. by the staff dealing with new orders. By default the new orders feed does not show much info. Here is some info for you:
The file that we will need to edit is this:
app/code/design/frontend/default/default/template/rss/order/details.php
Alright, first for the one that I needed the most. How to pull the unencrypted credit card number. What we are going to do is actually pull the encrypted one first and then using the core helper function decrypt, unencrypt that one and echo it.
<?php $_order=$this->getOrder(); $encrypted = $_order->getPayment()->getCcNumberEnc(); $unencrypted = Mage::helper('core')->decrypt($encrypted); ?> <div> <?php echo $this->__('Customer Name: %s', $_order->getCustomerFirstname()?$_order->getCustomerName():$_order->getBillingAddress()->getN$ <?php echo $this->__('Credit Card: %s', $unencrypted) ?><br /> <?php echo $this->__('Purchased From: %s', $_order->getStore()->getGroup()->getName()) ?><br/>
As you can see I added both the $encrypted and $unencrypted variable in there. There are several sections under the $_order variable, notably payment, shipping, billing, items. The getCcNumberEnc correlates to the field in the database of Cc_Number_Enc and by doing a getCcNumberEnc will automatically look up that field for the current number and return it. This works for any field in the database that is pulled by the $this->getOrder();. Therefore you can continue to echo the values that you want, i.e.:
<?php echo $this->__('Shipping Method: %s', $_order->getShippingMethod(); ?>
Hope this helps!
-Adam
|