I have this following array:
return array(
$order->getRealOrderId(),
Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true),
$this->getPaymentMethod($order),
$this->getShippingMethod($order),
$this->formatPrice($order->getData('grand_total'), $order),
$this->getTotalQtyItemsOrdered($order),
$order->getCustomerName(),
$order->getCustomerEmail(),
$this->getStreet($billingAddress),
$billingAddress->getData("postcode"),
$billingAddress->getData("telephone"),
);
I want to edit the return value of getPaymentMethod($order) and getShippingMethod($order).
$this->getPaymentMethod($order) returns, cashondelivery or paypal. I want the text to be changed to "Cash on Collection" if the return value is cashondelivery.
Similarily, getShippingMethod($order) returns, Home Delivery (some text here) or Self Collection (some text here). I want to change it to Home Delivery or Self Collection without the extra words. How can I do this within an array?