在捆綁產品的每件商品之後,在我的Magento pdf發票中獲得價格,在我的情況下$ 0.00如何刪除該商品?我發現產品是由$ this - > _ drawItem($ item,$ page,$ order)寫的; in Invoice.php從pdf發票(magento)中的捆綁產品中刪除項目價格
如何從我的pdf發票中刪除0.00美元?
非常感謝!
在捆綁產品的每件商品之後,在我的Magento pdf發票中獲得價格,在我的情況下$ 0.00如何刪除該商品?我發現產品是由$ this - > _ drawItem($ item,$ page,$ order)寫的; in Invoice.php從pdf發票(magento)中的捆綁產品中刪除項目價格
如何從我的pdf發票中刪除0.00美元?
非常感謝!
您需要查看Mage_Bundle_Block_Catalog_Product_View_Type_Bundle_Option並修改getPrice函數,但正確執行此操作需要重寫類,這完全是另一個話題。重寫的一個很好的起點就是這樣的參考:http://codemagento.com/2011/02/rewriting-a-block-class/
對不起,但這並沒有幫助我.. –
配置中定義的每種產品類型的渲染器。默認渲染器和分組產品類型都在app/code/core/Mage/Sales/etc/config.xml
定義:
<pdf>
<invoice>
<default>sales/order_pdf_items_invoice_default</default>
<grouped>sales/order_pdf_items_invoice_grouped</grouped>
</invoice>
...
</pdf>
對於在app/code/core/Mage/Bundle/etc/config.xml
捆綁產品類型:
<pdf>
<invoice>
<bundle>bundle/sales_order_pdf_items_invoice</bundle>
</invoice>
...
</pdf>
和相應的模型是Mage_Bundle_Model_Sales_Order_Pdf_Items_Invoice
您可以創建自己的渲染延伸在您的本地名稱空間中從此模型中複製並更改draw()
方法並在您的con中定義此渲染器無花果文件。
你有什麼magento版本? – nethead