Official OpenMage LTS codebase | Migrate easily from Magento Community Edition in minutes! Download the source code for free or contribute to OpenMage LTS | Security vulnerability patches, bug fixes, performance improvements and more.
When a shipment is a "return", only the "ShipFrom" needs to change from the store owner to the customer. The "ShipTo" will already be the store owner and does not need to be changed.
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
Create a return shipment and try to get labels.
Questions or comments
This is kind of funny, actually. If you look at the XML version of the code that creates the request object, you can see that the XML code does not REPLACE the "ShipFrom" and "ShipTo" when it's a return shipment--it actually ADDS another "ShipTo" node, which is ignored by UPS. Since UPS only looks at the first "ShipTo" node, the old XML code worked even though it was wrong. The REST code tried to mirror what the XML code does, but actually replaces the node instead of adding more.
Contribution checklist (*)
[x] Pull request has a meaningful description of its purpose
[x] All commits are accompanied by meaningful commit messages
[ ] All automated tests passed successfully (all builds are green)
how do you create a return shipping label? I know only how to generate a normal shipping label, but I see know that the PDF is broken for me, it doesn't open.
Description (*)
When a shipment is a "return", only the "ShipFrom" needs to change from the store owner to the customer. The "ShipTo" will already be the store owner and does not need to be changed.
Related Pull Requests
N/A
Fixed Issues (if relevant)
N/A
Manual testing scenarios (*)
Create a return shipment and try to get labels.
Questions or comments
This is kind of funny, actually. If you look at the XML version of the code that creates the request object, you can see that the XML code does not REPLACE the "ShipFrom" and "ShipTo" when it's a return shipment--it actually ADDS another "ShipTo" node, which is ignored by UPS. Since UPS only looks at the first "ShipTo" node, the old XML code worked even though it was wrong. The REST code tried to mirror what the XML code does, but actually replaces the node instead of adding more.
Contribution checklist (*)