Announcement
Collapse
No announcement yet.
Quote Item Link Multiple Field
Collapse
X
-
Actually in quote item, I am linking each product to multiple supplierfees, because same product might need multiple suppliers.
So quoteItem is in a many to many relationship with supplier fees.
In item.js->fetch
fetch: function () {
var data = {
supplierFeessIds: this.model.get('supplierFeessIds'),
supplierFeessNames: this.model.get('supplierFeessNames'),
};
return data;
},
And in hooks->quoteItem
protected function setItemWithData(Entity $item, \StdClass $o) {
$data = array(
'supplierFeessIds' => $this->getAttributeFromItemObject($o, 'supplierFeessIds'),
'supplierFeessNames' => $this->getAttributeFromItemObject($o, 'supplierFeessNames'),
);
}
after save, quote_item_supplier_fees table is now saved with data. But in quote detail view supplierFees is empty.
Comment
Comment