-
Notifications
You must be signed in to change notification settings - Fork 9.4k
MAGESHIP-21-develop Add track_url to DB & API and send via Customer S… #10977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAGESHIP-21-develop Add track_url to DB & API and send via Customer S… #10977
Conversation
app/code/Magento/Sales/composer.json
Outdated
@@ -32,7 +32,7 @@ | |||
"magento/module-sales-sample-data": "Sample Data version:100.3.*" | |||
}, | |||
"type": "magento2-module", | |||
"version": "100.3.0-dev", | |||
"version": "100.3.1-dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not needed, the version of the extension will be bumped automatically during the build depending on the severity of the changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TrackUrl interface is added to the system but never referenced neither from the interfaces in Api namespace nor from the extensions attributes. How is it expected to be exposed through the API?
I tried to run API query adding track_url to the body, but it resulted in decoding error, because Property TrackUrl
does not have corresponding setter in class Magento\Sales\Api\Data\ShipmentTrackCreationInterface
Please advise.
Request:
{
"items": [
{
"extension_attributes":[],
"order_item_id":3,
"qty":1
},
{
"extension_attributes":[],
"order_item_id":4,
"qty":1
}
],
"notify":true,
"appendComment":true,
"comment":{
"extension_attributes":[],
"comment":"Shipped via Shipment Provider",
"is_visible_on_front":0
},
"tracks":[
{
"extension_attributes":[],
"track_number":"1234567890",
"track_url": "http://fedex.com/122321212",
"title":"fedex",
"carrier_code":
"fedex"
}
],
"packages":[
{
"extension_attributes":[]
}
],
"arguments":{
"extension_attributes":[]
}
}
@@ -46,6 +46,10 @@ | |||
*/ | |||
const TRACK_NUMBER = 'track_number'; | |||
/* | |||
* Track URL. | |||
*/ | |||
const TRACK_URL = 'track_url'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this constant does not have corresponding getter and setter in this interface and should not reside here, rather in the interface which has setter for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -160,7 +160,7 @@ | |||
"magento/module-robots": "100.3.0-dev", | |||
"magento/module-rss": "100.3.0-dev", | |||
"magento/module-rule": "100.3.0-dev", | |||
"magento/module-sales": "100.3.0-dev", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not needed, it will be automatically set by the packaging tool
@RhodriOwainDavies discussed with @antonkril today, this change cannot be released in 2.2 as backward incompatible. Please re-create the PR for |
Please beware this is critical for Magento Shipping (to be released in v2.2.2 - discuss with @joni-jones @orlangur & Nadia Kalinovich
Linked to #10799
Forked from
develop
branch, merge target branchdevelop
as per @orlangur 's request.Description
Add a new field sales_shipment_track.track_url.
Expose this field via API.
Including this URL as a hyperlink in the Shipment Sent Email template.
Feature
To support impending Magento Shipping feature request of inserting Carrier Specific URL in email template to Customer
Manual testing scenarios
POST /V1/order/{orderId}/ship
Pass in tracking_url as an extension attribute (in same manner as tracking_number)
In the admin section, view a Shipment which already has a trackinging URL set (via API in Test Can you commit to repository a folder dev/tests/static ? #1). Click Send Tracking Email. Check email, Tracking Number should be a hyperlink to tracking_url
Contribution checklist