firegento-pdf
firegento-pdf copied to clipboard
Payment Method Title M2E Pro
I use the m2e pro extension and do import the orders from eBay. On the invoice appears the Payment Method Title "M2E Pro Payment" but not the actual Payment Method from eBay like PayPal. When i change to the standard Magento PDF Engine everything works fine, though... How can i solve this problem?
Thanks in advance
I can only give you a short code snippet how you can get the "real" payment method (it is not from me), but you would have to implement that in your own engine, see the FAQ.
$paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())
->setIsSecureMode(true)
->toPdf();
$payment = explode('{{pdf_row_separator}}', $paymentInfo);
foreach ($payment as $key=>$value) {
if (strip_tags(trim($value)) == '') {
unset($payment[$key]);
} else {
$payment[$key] = strip_tags(trim($value));
}
}
$paymentMethodArray = $this->_prepareText(
$payment[0], $page, $font, 10, $width
);
$paymentMethod = array_shift($paymentMethodArray);
@Schrank should we implement something like that in the default engine?
Thanks for the quick reply. I kind of tried to do so but i failed. It's definitely too "much" for me. Hopefully you'll implement this into the plugin soon. But thank you anyways...
This is horrible code and I hope, there is a better way to do this. But I think we should implement this. Might help for Billpay, etc. too.
btw, if you want to sponsor this implementation, it can be done a lot faster.
Do you see a time range to provide this update? Or can you explain step by step how we can install your code to fix this problem?
As for the free part, I don't think this will happen in the near future unbfortunately.I can only speak for myself, but I have more paid work to do, then I can handle currently - I assume it is the same with @sprankhub.
If you are interested in contracting some one, please feel free to send us an email, this motivates a lot :-)