magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Customizable Option values do not end up in REST API call /orders (orderRepositoryV1) #116

Open amenk opened 6 years ago

amenk commented 6 years ago

Summary

We have added a customizable option text area using the admin backend, which is filled with text when adding the product to the cart. Later we export the order to an ERP via the REST interface.

In the resulting XML or JSON, the attribute is completely missing. In the backend, the information is there.

We believe, that the information in the backend, should also be exposed via the API.

Examples

curl -X GET --header "Accept: application/xml" --header "Authorization: Bearer $B" "http://shop.example.com.localhost/rest/english/V1/orders/131"

curl -X GET --header "Accept: application/json" --header "Authorization: Bearer $B" "http://shop.example.com.localhost/rest/english/V1/orders/131"

Proposed solution

Solution would be to put those attributes to the REST result.

I do not yet have a solution code wise (can try to make a pull request).

Magento 2.2.5

magento-engcom-team commented 6 years ago

Hi @amenk. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me $VERSION instance

where $VERSION is version tags (starting from 2.2.0+) or develop branches (for example: 2.3-develop). For more details, please, review the Magento Contributor Assistant documentation.

@amenk do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

magento-engcom-team commented 6 years ago

Hi @engcom-backlog-nazar. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

amenk commented 6 years ago

We were able to reproduce it with Vanilla Magento CE 2.2.6

amenk commented 6 years ago

A current workaround is to write an own module which copies the custom options to the API - but I feel this should be done in the core already, as the custom options are a core feature

amenk commented 6 years ago

https://magento.stackexchange.com/a/243721/81

sdzhepa commented 5 years ago

Hello @amenk

According to the label "Feature Request" this ticket has been moved into "community-features" track

Thank you for collaboration

amenk commented 5 years ago

Anybody who wants to implement can ping me ... I can provide a custom module solving this issue (but having too much customized code, so I do not want to publish it, yet, neither have the time to contribute to the core ATM). But always happy to help.

colinzeal109 commented 5 years ago

Anybody who wants to implement can ping me ... I can provide a custom module solving this issue (but having too much customized code, so I do not want to publish it, yet, neither have the time to contribute to the core ATM). But always happy to help. @amenk I'm interested in the module. Most of my products use the customizable options and I'd love to be able to export them with the API. Thanks.

amenk commented 5 years ago

@colinzeal109 can you drop me an eMail to a dot menk at imi dot de to send you "IMI_OptionsToOrderInterface" .. would be great if you can make it ready for a general purpose and publish it on GitHub then