感谢您的帮助。这是当前代码:
如何调整到最后加上 ttc 价格?
foreach ($shipment->getItemsCollection() as $item) {
/**
* @var Mage_Sales_Model_Order_Shipment_Item $item
*/
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0.85));
$page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));
$page->setLineWidth(0.5);
$page->drawRectangle($x + 420, $this->y - 8, $page->getWidth() - 50, $this->y + 12);
$page->setFillColor(new Zend_Pdf_Color_GrayScale(0));
$page->drawRectangle(50, $this->y - 8, $page->getWidth() - 50, $this->y + 12, Zend_Pdf_Page::SHAPE_DRAW_STROKE);
$page->drawLine($x + 70, $this->y + 12, $x + 70, $this->y - 8);
$page->drawLine($x + 350, $this->y + 12, $x + 350, $this->y - 8);
$page->drawLine($x + 420, $this->y + 12, $x + 420, $this->y - 8);
$page->drawText($item->getSku(), $x + 5, $this->y, 'UTF-8');
$page->drawText(strlen($item->getName()) > 50 ? substr($item->getName(), 0, 52) . "..." : $item->getName(), $x + 75, $this->y, 'UTF-8');
$product = Mage::getModel('catalog/product')->load($item->getProductId());
if ($product->getId()) {
$size = $product->getAttributeText('size') ?: $product->getData('size_label');
$page->drawText($size, $x + 355, $this->y, 'UTF-8');
}
$page->drawText('', $x + 425, $this->y, 'UTF-8');
$this->y -= 20;
}`**enter code here**`