I am new to shopware development and I have been having a problem with one of my tasks. I want to send the user input to a php file in the back. Could someone explain the process of doing so?
There is no direct connection between frontend and backend.
Data is stored in the database. Write the data from the frontend in the database. Get the data in the backend from the database.
How do I access the user input data in the frontend?
You have to write an plugin.
I have made my plugin. Inside my plugin, how do I access the data that is being entered by the user?
I guess you will find everything you need in the developer documentation.
I did not find that in the documentation but thanks for trying.
@hasan.h Shopware 6 is built on Symfony and uses MVC and OOP related patterns like Factories, Repositories, etc.
If you are novice in object-oriented PHP you’re going to have a hard time.
That being said you will need a controller to interact with the view to handle the request object and a custom route or a subscriber to bootstrap the plugin itself based on a user accessing it.
Also you probably want to handle the data somehow, which involves having a model and using Shopware 6 DAL based on repositories.
here is a quick example of a controller focusing plugin, good luck.