
I want to know how to add a custom form on the shipment page.

Answers
-
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,113 βοΈ - Guardians (admin)
Heyhey @ramesh ,
welcome to the Spryker world :D
Have you already looked in our free developer trainings at safari.spryker.com? There you should find trainings for how to extend the profile form, how to persist data etc. That knowledge is the foundation of what you aim to do :)
All the best,
Florian
0 -
Hey @fsmeier,
Thank you for your quick response. I think extending the profile form is different from implementing a new form on the shipment page. Could you please share any other material or references?
Regards,
Ramesh0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,113 βοΈ - Guardians (admin)
Heyhey @ramesh ,
yes, its different. Yet I think the beauty of Spryker is that it mostly follows the same procedures and structures.
Lets do the thinking process together:
- "Shipment page" means for me its within the Checkout which is handled ootb by the StepEngine. The route for that is defined in the package
checkout-page
withinvendor/spryker-shop/checkout-page/src/SprykerShop/Yves/CheckoutPage/Plugin/Router/CheckoutPageRouteProviderPlugin.php
- Based on that plugin within the method
addShipmentStepRoute()
you find out the correct controller and method (CheckoutController
with theshipmentAction
) - So we open
vendor/spryker-shop/checkout-page/src/SprykerShop/Yves/CheckoutPage/Controller/CheckoutController.php
and find the methodshipmentAction()
- You follow
$this->getFactory()->createCheckoutFormFactory()->createShipmentFormCollection()
and find the method in the filevendor/spryker-shop/checkout-page/src/SprykerShop/Yves/CheckoutPage/Form/FormFactory.php
and you open the file - You see that
createShipmentFormCollection()
usesgetShipmentFormTypes()
which in the end usesgetShipmentCollectionForm()
within the same file and you also find the form which is currently used for the shipment page:vendor/spryker-shop/checkout-page/src/SprykerShop/Yves/CheckoutPage/Form/Steps/ShipmentCollectionForm.php
With the knowledge of the courses and finding these files and methods you should now be able to customize the shipment step :)
Is my showed thought-process understandable? If anything is unclear dont hesitate to ask again and describe what you tried so far.
All the best,
Florian
0 - "Shipment page" means for me its within the Checkout which is handled ootb by the StepEngine. The route for that is defined in the package
-
Yes, it's understandableβ¦.thank you for the detailed reply. But I'm still finding it difficult to implement this π
I think customizing the checkout steps is a bit challenging... I might need a full course on this if possible π
0 -
fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,113 βοΈ - Guardians (admin)
Yes, in the beginning it can be very overwhelming, but you will get there, soon!! πͺ
What you wanna achieve? Add fields to the shipping step? Add another step to request additional data from the customer?
All the best,
Florian
0 -
In the shipping step itself, I want to add a custom "Delivery Instructions" form to collect data like:
- Preferred Time Slot
- Leave at Doorstep (checkbox)
- Alternate Contact Number
- Additional Instructions
Is it possible? π
0
Categories
- All Categories
- 42 Getting Started & Guidelines
- 7 Getting Started in the Community
- 8 Additional Resources
- 7 Community Ideas and Feedback
- 83 Spryker News
- 970 Developer Corner
- 823 Spryker Development
- 91 Spryker Dev Environment
- 362 Spryker Releases
- 3 Oryx frontend framework
- 36 Propel ORM
- 68 Community Projects
- 3 Community Ideation Board
- 30 Hackathon
- 3 PHP Bridge
- 6 Gacela Project
- 30 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
- 33 Product & Business Questions
- 70 Spryker Safari Questions
- 50 Random