开发者

Magento Credit memo, changing ORDER-id to INVOICE-id

In Magento you can cancel an order or invoice, and set it to a creditmemo. This is working correctly, but in our case we need the INVOICE-id, instead of an ORDER-id. By default, Magento uses the INVOICE-id.

This isn't some "setting", but it would probably need to be coded by hand. That's not a problem for me, but I can't seem to find the right开发者_如何学编程 file to edit.

Does anyone know whether this is even possible? Or does someone else had this problem before?

Thanks in advance!

:( Can't seem to set a bounty, otherwise i would have done it.


If you have an invoice ID, you can trivially retrieve the order ID of the order it is tied to.

$invoice = Mage::getModel("sales/order_invoice")->load($invoice_id);
$order_id = $invoice->getOrderId();

Hope that helps!

Thanks, Joe

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜