Giter VIP home page Giter VIP logo

Comments (15)

boldsidney avatar boldsidney commented on August 16, 2024 1

hi @affirmative-pl ,
The update to 1.3.0 is now available.

The comment limit functionality should now work as you described and the comment is now visible through the /V1/orders/{id} route of the salesOrderRepositoryV1 API.

from magento2-ordercomments.

boldsidney avatar boldsidney commented on August 16, 2024

hi @affirmative-pl

I had a quick look, and it currently doesn't seem possible to retrieve the comment using API.

Let me know if you still need this functionality. I'll be able to make some time next week to add this functionality there is still a need for it.

from magento2-ordercomments.

affirmative-pl avatar affirmative-pl commented on August 16, 2024

Hi,
we'd love to have the attribute available via API, but we also noticed, while testing the module, that the way it limits comment size is not very user-friendly. It allows entering more characters than the limit states, and displays an error message. When more traditionally limits like this simply do not allow entering more characters, making it instantly obvious to the user, what to do.

obraz

from magento2-ordercomments.

boldsidney avatar boldsidney commented on August 16, 2024

hi @affirmative-pl ,
Thank you for your feedback regarding the comment limit functionality. I shall add it to my todo list for next week together with allowing the comments to be visible in the API.

from magento2-ordercomments.

affirmative-pl avatar affirmative-pl commented on August 16, 2024

hi @boldsidney,
glad to hear you're going to take our feedback and enhance your module.
I look forward to the update.
Best wishes,
Kate

from magento2-ordercomments.

affirmative-pl avatar affirmative-pl commented on August 16, 2024

Thanks @boldsidney
We'll give it a go!

from magento2-ordercomments.

affirmative-pl avatar affirmative-pl commented on August 16, 2024

Hi @boldsidney
Unfortunately, we are not seeing the comments via /V1/orders/{id} route
Can you give us more details on this field, please
Thanks you
Kate

from magento2-ordercomments.

boldsidney avatar boldsidney commented on August 16, 2024

hi @affirmative-pl ,
the data should be part of the extension_attributes field
field_in_api

from magento2-ordercomments.

andrewbgittus avatar andrewbgittus commented on August 16, 2024

Hi @boldsidney

Our client Nutri-gold has your addon and I believe they're the ones who requested this functionality. Within our product, Zynk, we're making a request to the GET /index.php/rest/default/V1/orders Magento endpoint but within the data we're receiving from the website the field 'bold_order_comment' doesn't appear within the extension attributes collection within the raw JSON data we receive from their site.

{ "items": [ { "applied_rule_ids": "1", "base_currency_code": "GBP", "base_discount_amount": 0, "base_discount_invoiced": 0, "base_grand_total": 69.92, "base_discount_tax_compensation_amount": 0, "base_discount_tax_compensation_invoiced": 0, "base_shipping_amount": 0, "base_shipping_discount_amount": 0, "base_shipping_discount_tax_compensation_amnt": 0, "base_shipping_incl_tax": 0, "base_shipping_invoiced": 0, "base_shipping_tax_amount": 0, "base_subtotal": 58.27, "base_subtotal_incl_tax": 69.92, "base_subtotal_invoiced": 58.27, "base_tax_amount": 11.65, "base_tax_invoiced": 11.65, "base_total_due": 0, "base_total_invoiced": 69.92, "base_total_invoiced_cost": 0, "base_total_paid": 69.92, "base_to_global_rate": 1, "base_to_order_rate": 1, "billing_address_id": 32, "created_at": "2018-04-05 09:05:19", "customer_email": "[email protected]", "customer_firstname": "Kate", "customer_gender": 0, "customer_group_id": 2, "customer_id": 12098, "customer_is_guest": 0, "customer_lastname": "xxxxx", "customer_note_notify": 1, "discount_amount": 0, "discount_description": "Buy 3 Get 1 Free", "discount_invoiced": 0, "email_sent": 1, "entity_id": 17, "global_currency_code": "GBP", "grand_total": 69.92, "discount_tax_compensation_amount": 0, "discount_tax_compensation_invoiced": 0, "increment_id": "500000013", "is_virtual": 0, "order_currency_code": "GBP", "protect_code": "xxxxxxxxxx", "quote_id": 41, "remote_ip": "", "shipping_amount": 0, "shipping_description": "Service - Royal Mail 1st Class Packet Post", "shipping_discount_amount": 0, "shipping_discount_tax_compensation_amount": 0, "shipping_incl_tax": 0, "shipping_invoiced": 0, "shipping_tax_amount": 0, "state": "processing", "status": "processing", "store_currency_code": "GBP", "store_id": 1, "store_name": "Main Website\nMain Website Store\n", "store_to_base_rate": 0, "store_to_order_rate": 0, "subtotal": 58.27, "subtotal_incl_tax": 69.92, "subtotal_invoiced": 58.27, "tax_amount": 11.65, "tax_invoiced": 11.65, "total_due": 0, "total_invoiced": 69.92, "total_item_count": 4, "total_paid": 69.92, "total_qty_ordered": 5, "updated_at": "2018-04-05 09:05:44", "weight": 1.7893, "items": [ { ... }, { ... }, { ... }, { ... } ], "billing_address": { ... }, "payment": { ... ], "amount_ordered": 69.92, "amount_paid": 69.92, "base_amount_ordered": 69.92, "base_amount_paid": 69.92, "base_shipping_amount": 0, "base_shipping_captured": 0, "cc_last4": null, "entity_id": 17, "last_trans_id": "", "method": "realexpayments_hpp", "parent_id": 17, "shipping_amount": 0, "shipping_captured": 0 }, "status_histories": [ { "comment": "Invoiced amount of \u00a369.92 Transaction ID: ", "created_at": "2018-04-05 09:05:43", "entity_id": 65, "entity_name": "order", "is_customer_notified": null, "is_visible_on_front": 0, "parent_id": 17 }, { "comment": "Authorised amount of \u00a369.92 Transaction ID:", "created_at": "2018-04-05 09:05:43", "entity_id": 64, "entity_name": "order", "is_customer_notified": null, "is_visible_on_front": 0, "parent_id": 17 }, { "comment": null, "created_at": "2018-04-05 09:05:19", "entity_id": 63, "entity_name": "order", "is_customer_notified": 1, "is_visible_on_front": 0, "parent_id": 17, "status": "pending" } ], "extension_attributes": { "shipping_assignments": [ { "shipping": { "address": { ... }, "method": "xxxxxxxx", "total": { "base_shipping_amount": 0, "base_shipping_discount_amount": 0, "base_shipping_discount_tax_compensation_amnt": 0, "base_shipping_incl_tax": 0, "base_shipping_invoiced": 0, "base_shipping_tax_amount": 0, "shipping_amount": 0, "shipping_discount_amount": 0, "shipping_discount_tax_compensation_amount": 0, "shipping_incl_tax": 0, "shipping_invoiced": 0, "shipping_tax_amount": 0 } }, "items": [ ... ] } ] } } ], "search_criteria": { "filter_groups": [ { "filters": [ { "field": "increment_id", "value": "500000013", "condition_type": "eq" } ] } ], "page_size": 50, "current_page": 1 }, "total_count": 1 }

from magento2-ordercomments.

boldsidney avatar boldsidney commented on August 16, 2024

hi @andrewbgittus,

That looks like the GET /V1/orders call, to display a list of orders.
Can you try with the GET /V1/orders/{id} call, I've only added the field to that one.

If the GET /V1/orders/{id} isnt usable for your workflow i could look into also adding it to the list view GET /V1/orders later at the end of this week.

from magento2-ordercomments.

andrewbgittus avatar andrewbgittus commented on August 16, 2024

That's definitely the cause of the issue, within Zynk we use the /index.php/rest/default/V1/orders endpoint as it means within integrations we can essentially request new orders without knowledge of the increment_id and then process these orders into the relevant system.

Thanks @boldsidney I'll pass this onto the client.

from magento2-ordercomments.

dcabrejas avatar dcabrejas commented on August 16, 2024

Hi @boldsidney

Thank you very much for the module, it works great.
FYI we also find ourselves needing that field in the /rest/default/V1/orders endpoint for an integration.
I think it would be quite a nice addition to the module.

from magento2-ordercomments.

danslo avatar danslo commented on August 16, 2024

I have a pull request open for this: #18

from magento2-ordercomments.

boldsidney avatar boldsidney commented on August 16, 2024

Hi @danslo thank you for building this feature.

@andrewbgittus , @dcabrejas
You can now update to version 1.4.0 to retrieve comments from the /V1/orders endpoint.

from magento2-ordercomments.

dcabrejas avatar dcabrejas commented on August 16, 2024

Thanks @danslo @boldsidney

from magento2-ordercomments.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.