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 everybody. I want to implement a kind of an extra fee when a certain combination of shipment/paym
Hi everybody. I want to implement a kind of an extra fee when a certain combination of shipment/payment was chosen in checkout process. Just in the checkout step its possible to know about this expenses because you just know here what shipment is selected (via checkout-data endpoint). For this, I tried to investigate the shipment feature for this and how the prices there gets calculated, but i canβt figure out, where the final calculation for totals are made. So there are no final prices when a shipment method is provided. Just the methods with single prices are returning. How to get the complete prices on checkout? π€ Some other ideas to show an extra fee when a certain combination of shipment/payment method was chosen? Thanks!
Comments
-
you need to implement calculator plugin https://documentation.spryker.com/docs/calculator-plugins
0 -
and then apply your logic there
0 -
Yes, thats obvious. Itβs more the workflow β¦ where to add what shipment was chosen and then where to calculate the stack again? On checkout-data endpoint? On update cart endpoint? The last one does not accept any shipment information β¦ seems a lot of work do get them so. I am a bit wondering that this is nowhere considered β¦
0 -
you need to call the calculation client recalculate when you have created the plugin
0 -
so you add to quote things you need to determine the additional costs based on user input -> call the calculation client -> do the calculation in the plugin
0 -
Okay, i try to explain it the other way around β¦ on which glue endpoint(s) can (or should) i set the used shipment method for the current cart? When the shipment method was set in the current quote, i am pretty sure that the calculation gets done correctly when i fetch the current cart again. But for now it seems that no endpoint is capable of setting the correct shipment method so that its persisted in the cart (201907.0)
0 -
Hi Ingo! You are correct assuming that the shipment data is not persisted in the Quote. And since Glue uses the persisted quote, it is at no point aware of the selected shipping methods.
Nevertheless if the shipping method is sent to the
/checkout
it will get applied and if the expense depends on that, it will show up.No way currently to see the cart with expense applied though.
0 -
Good morning @UPWG9AYH2! Can I close support ticket?
0 -
Hi Eugenia. Thanks for your comment. I was just wondering since this is in my eyes something the most people using glue should stumble over. Is there any experience how they handle this? What do they show to their costumer? So for now I found a little βworkaroundβ β¦ in checkout-data i make an extra call to the calculation facade (like in the final checkout endpoint) and do a recalculate of the current quotetransfer (which has a shipment method in it in that moment) β¦ that will persist at least the expense for shipping once. The drawback is, that when you add some items via item add endpoint, the expense calculation disappears. Since checkout and and product search/catalog are separate sections anyway at the moment, we could maybe live with that β¦ but it still remains not really a good solution β¦
0 -
@valerii.trots just this question also to you, maybe we can do something other
Is there any experience how they handle this? What do they show to their costumer?
0 -
I was going to send a link to our SPA demo instance - http://glue.91.spa.demo-spryker.com/react. But it seems that it's kind of broken as you can't go further than payment selection step. But the shipment expenses are reflected through checkout.
0 -
Now the big question: Does the frontend sum up the grand total by itself?
0 -
Would really like like to see the request/responses from console here, but as you said, it doesnt work
0 -
Seems like it's done on the FE side, I don't see any requests after the shipment method is selected.
0 -
Yes, confirmed by the developer of this SPA. It's done on the FE side completely.
0 -
Thanks a lot, then we will do this also that way π I think, the ticket can be closed
0 -
The glue demo frontend works now π β¦ seems i forgot to choose a country but it wasnβt marked as missing
0 -
Yes, the button is grey until you select the country at the address step. But it's marked as required with
*
. π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