Magento

eCommerce Software for Online Growth

Magento Forum

From setting up your store to managing your products, pages and promotions to generating detailed reports, the Magento User Guide empowers the user to utilize the platform for all of its vast capacity.
Available in eBook and Print formats – Download Now!!!
   
Changing the New Order Admin RSS Feed [Informational]
 
alistek
Sr. Member
 
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

 
Magento Community Magento Community
Magento Community
Magento Community
 
rolando247
Jr. Member
 
Total Posts:  3
Joined:  2009-03-24
 

adam, many people in the forum are looking for a smart way to generate a picklist to process their new orders, which would be very helpful. reading your post it seemed to me using the new orders rss feed could be a very easy and safe solution with no hacks or extensions needed. so I was trying to modify the order rss details.phtml in order to have it display also product options like Size (product_size) and Colour (product_colour) for configurable products, as these are obviously needed for the picklist. However, I ended up spending 3 days now trying this and I am a bit lost. Any hint on how to get the values of these configurable product’s attributes shown on the new orders rss feed would be great. making the nasty Magento order processing process easier would be great. the attributes/options I would like to include are:

- product_size
- product_colour

->I guess once I have seen how to pull one of these I can go the rest of the way alone…
cheers
roland

 
Magento Community Magento Community
Magento Community
Magento Community
 
rolando247
Jr. Member
 
Total Posts:  3
Joined:  2009-03-24
 

ok I have found one way, not sure if it is the best, but it works. pull the item sku in first and then look for the attributes. I found the describtion how to do this here http://www.magentocommerce.com/boards/viewthread/18142/ and here http://www.magentocommerce.com/boards/viewthread/19215/P15/
hope this helps. however, if anyone has a generic solution where you do not need to pull the sku first and define the exact attributes you need, but just the options that differ in a configurable product, that would be great…

 
Magento Community Magento Community
Magento Community
Magento Community
 
Ralf Bernert
Jr. Member
 
Total Posts:  11
Joined:  2008-07-18
 

Hi,

this is the code for adding custom attributes to the RSS feed:

$product Mage::getModel('catalog/product')->loadByAttribute('sku'$_item->getSku());
                        if (
$product->getData('color')!='') echo "color: </i>".$this->htmlEscape($product->getAttributeText('color'))."<i><br>";
                        if (
$product->getData('product_length')!='') echo "product_length: </i>".$this->htmlEscape($product->getAttributeText('product_length'))."<i><br>";
                        if (
$product->getData('product_size')!='') echo "product_size: </i>".$this->htmlEscape($product->getAttributeText('product_size'))."<i><br>";
                        if (
$product->getData('wax_temperature')!='') echo "wax_temperature: </i>".$this->htmlEscape($product->getAttributeText('wax_temperature'))."<i><br>";                        if ($product->getData('product_colour')!='') echo "product_colour: </i>".$this->htmlEscape($product->getAttributeText('product_colour'))."<i><br>";
                        if (
$product->getData('wax_smell')!='') echo "wax_smell: </i>".$this->htmlEscape($product->getAttributeText('wax_smell'))."<i><br>";
                        if (
$product->getData('money_value')!='') echo "money_value: </i>".$this->htmlEscape($product->getAttributeText('money_value'))."<i><br>";
                        if (
$product->getData('storage')!='') echo "storage: </i>".$this->htmlEscape($product->getData('storage'))."<i><br>";

Se attached file for details.

Cheers,
Ralf

File Attachments
details.phtml  (File Size: 9KB - Downloads: 96)
 
Magento Community Magento Community
Magento Community
Magento Community
 
Nick Houldsworth
Jr. Member
 
Total Posts:  5
Joined:  2009-06-03
 

Hi There,

I have added the following code to my RSS feed, to attempt to display the shipping city of each order (different locations will post orders, depending on where the shipping city is, so I wish to use this as a filter)

<?php echo $this->__('City: %s'$_order->getShippingAddress()->getCity()) ?><br/>

However, when I tested a few sales (logged in as the same person) and changed the shipping address on each order, in the feed it automatically pulled the most recent shipping address I use, and applied it to every order, rather than pulling the SPECIFIC shipping address for each order.

Am I doing something wrong? When I view all the orders in the Admin panel, the correct (different) shipping city has been applied to each, so why does it not pick this up in the RSS feed??

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
katherine04
Jr. Member
 
Total Posts:  3
Joined:  2009-05-21
 

this is really helpful. thanks for sharing :D

simulation rachat de credit

 
Magento Community Magento Community
Magento Community
Magento Community
 
aneguitar
Jr. Member
 
Total Posts:  8
Joined:  2009-09-10
Greece
 

Is it possible to make the rss appear on different urls for every website-store’s new orders?
I mean every website and store to have its own rss feed for the new orders.
thanks in advance!!!!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
 
© Copyright 2010 Varien. Magento, eCommerce software, is a trademark of Irubin Consulting Inc. DBA Varien
Privacy Policy|Terms of Service
Magento Community Count
177729 users|1089 users currently online|277194 forum posts