1

Using UpgradeSchema, I've successfully added two fields to the table

quote

and

sales_order

The two fields are called

delivery_note_doc_due_date

and

remarks

My question is: how can I add the methods

getRemarks()
setRemarks()
getDeliveryNoteDocDueDate()
setDeliveryNoteDocDueDate()

inside the

Data\CartInterface 

and

Data\OrderInterface

modules so that I can use REST API to create an order?

Your help will be much appreciated!

LDR

1
  • You may create extension attribute for that. Jan 31, 2019 at 10:38

1 Answer 1

0

You may create extension attributes:

etc/extension_attributes.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Api/etc/extension_attributes.xsd">    
    <extension_attributes for="Magento\Sales\Api\Data\OrderInterface">
        <attribute code="remarks" type="string" />
        <attribute code="delivery_note_doc_due_date" type="string" />       
    </extension_attributes>
    <extension_attributes for="Magento\Quote\Api\Data\CartInterface">
        <attribute code="remarks" type="string" />
        <attribute code="delivery_note_doc_due_date" type="string" />       
    </extension_attributes>
</config>
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.