What are the Slack Archives?
Itβs a history of our time together in the Slack Community! Thereβs a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.
Because this space is not active, you wonβt be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..
Hi all, is there an easy way to get the shipment costs of an order? (Net, Gross, Taxes)
Hi all,
is there an easy way to get the shipment costs of an order? (Net, Gross, Taxes)
Comments
-
if you pull order from sales facade it should come with hsipment information (which is deprecated) and every item from said order should have shipment information set (shipment per item is the new way), don't know if this is the easy solution you are looking for
0 -
Thanks for your answer. That looks really complicated. To get the shipment costs (net, gross and taxes) I need to iterate over the items, get the shipments, it's method and then the prices. Then I can get a net amount and a gross amount and thus can calculate the taxes and then I need to add those values up for all items.
I thought there would maybe exist something like this:
$orderTransfer->getShipment()->getNetPrice()
,$orderTransfer->getShipment()->getGrossPrice()
and$orderTransfer->getShipment()->getTaxAmount()
.I don't really understand the concept(s) behind all this and the documentation doesn't really help.
0 -
well, me neither
0 -
but as I mentioned before, if you get OrderTransfer from SalesFacade, it will have getShimpmentMehods method, which should return list with a single element, if you have multi shipment disabled (and it seems you do)
0 -
but this method is deprecated, so use it with caution as it may disappear or start throwing exceptions at some point
0 -
Thanks a lot. I will try to solve it somehow with this new information.
0 -
It would be really nice to know the benefit of migrating shipping information on item level. If there are a lot of items in the cart, the json is explodes with duplicated shipping transfers.
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 75 Spryker News
- 924 Developer Corner
- 783 Spryker Development
- 88 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 35 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 25 Job Opportunities
- 3.2K π Slack Archives
- 116 Academy
- 5 Business Users
- 370 Docker
- 551 Slack General
- 2K Help
- 75 Knowledge Sharing
- 6 Random Stuff
- 4 Code Testing
- 32 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random