2013-02-05 21 views

回答

0

我做了一些,而以前由getPdf() -function实现在app/code/local/Mage/Sales/Model/Order/Pdf/Shipment.php这个代码:

$total = 0; 
foreach($shipment->getAllItems() as $item) { 
       if ($item->getOrderItem()->getParentItem()) { 
        continue; 
       } 
       if(!$item->getOrderItem()->getData('qty_shipped') >= (float)1.0000) {     
        continue; 
       } 
       $total += ($item->getPrice() - $item->getOrderItem()->getDiscountAmount())*$item->getQty(); 
     } 

希望我能帮上忙。关于您的问题:下次您提出问题并期望社区为您提供帮助时,请发布一些代码示例,说明您尝试过的方法,以及为什么/如何失败,并且要更精确一些,在magento的代码结构中试图完成你的目标。

顺便说一句,还有一个Magento的-Stackexchange站点:

https://magento.stackexchange.com/