Любой может помочь мне присоединить элементы счета (или заказанные элементы) в сетке счетов-фактур продаж?Magento - как использовать счета-фактуры в сетке счетов-фактур magento
Я хочу получить sku (ы) из счета-фактуры.
$collection = Mage::getResourceModel($this->_getCollectionClass())
->addAttributeToSelect('tax_amount')
->addAttributeToSelect('increment_id')
->addAttributeToSelect('created_at')
->addAttributeToSelect('entity_id')
->addAttributeToSelect('grand_total')
->addAttributeToSelect('shipping_amount')
->addAttributeToSelect('subtotal')
->addAttributeToSelect('state')
->join('order', 'main_table.order_id=order.entity_id', array('shipping_address_id','shipping_method'))
->join('order_address', 'order.billing_address_id=order_address.entity_id', array('billing_firstname'=>'firstname','billing_lastname'=>'lastname','email','region','postcode','street','city','telephone','company','pfpj_cui','pfpj_reg_com','pfpj_banca','pfpj_iban'))
->join('shipment_track', 'main_table.order_id=shipment_track.order_id', 'track_number')
и это то, что я пытался, но он не работает ...
->join('invoice_item', 'main_table.entity_id=invoice_item.parent_id', 'sku');
спасибо!