How to save contact us form data in magento2 - events

I am new to Magento 2. Can any one tell me how to save contact us form data into the database using events and observers, and display them in admin grid under the customer section in Magento 2?

If you have set SMPT to your magento2 store then you will receive conatct us data to mail id which you mention at Stores->Configuration->General->Contacts->Email Option->Send Emails to.
On this if you wish to show at admin grid, you must create your own table and grid to show the data in admin and create a before plugin to the controller Magento\Contact\Controller\Index\Post where you save data into your table you created.

You must create a separate module for the contact us a table, admin grid and forms.

Related

How to show data as per users in Voyager Laravel

Voyager is one of the most efficient admin panel for laravel. But, here I am trapped in a typical situation. For example, I am using this admin panel for booking appointment. I want the admin to view all the records but the user to view, edit, delete only the records which he had added. I can insert my own Page there but that will increase the work as I have to create my own add, edit, and delete functionality along with the view. I just want to know the place where the data is fetched from database to display on the view page so that as per the login user I could manipulate it.
To achieve this:
You need to add policy to your bread php artisan make:policy PostPolicy
Inside the policy you can specify who can edit what depending on your logic

Magento drop down to be selected by buyer

I am new to Magento. The website I am working on sells contact lenses and some custom attributes need to be added on the product page. Now requirement states that user has to select some prescription values from drop-down fields before adding the product to cart. I am totally lost on how to do it. This question asks the same thing:
Fields to be filled by the buyer in magento product page
But the answer points to dead link. How to retrieve some custom information from user on product page and store it along with order?
This is possible with custom option. Magento provide custom option facility. when you create custom option then it displayed on product page and you will get information from customer and that information stored in order automatically.
reference link : https://www.youtube.com/watch?v=wfZCXjWqrSM
You can create Dynamic custom option. I have answered thw whole process here:
dynamically add product custom options magento
As the Custom option applicaple to particular category. so you need to add required conditionon on precription form on product detail page.
You can manage this using custom option and there is a great module available in magento connect to achieve your goal.
http://www.magentocommerce.com/magento-connect/custom-option-manger.html

how to insert data to db in magento

I created a new module following with this url:
In my module i created a registration form.
So now i want to insert the data entered into my registration form.
How is it possible?
Take a look at these instructions about models and database access:
http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-5-magento-models-and-orm-basics
This should get you up and running.
You need a custom db table with a custom model and collection of this table. There are lots of way but this is the magento way.
This link will help you http://www.magentocommerce.com/wiki/5_-_modules_and_development/0_-_module_development_in_magento/custom_module_with_custom_database_table

How to Create a Custom Registration form and Approval Process in Magento?

We are setting up a new Magento site and will allow clothing designers the ability to sell their products in our store. We've already created a separate user group with appropriate permissions for Designers. However, we need to create a custom registration form for use by them, and an accompanying approval workflow. Can someone provide links to guidelines in creating such a custom form and workflow? Is it advisable to create a separate store for each designer, or create user defined attributes to assign a designer to their products in the main store catalog? Also, given that we will have a separate and changing commission percentage for each designer, what custom module logic must be used to apply these commissions correctly? Specifically, what Magento objects must be leveraged to produce such a commission process?
Thanks much for your help and guidance.
Here are 2 examples that should help:
Magento – Custom email contact form with notification system
Contact Form in Magento

Magento Customer Wizard Registration

I'm trying to create a simple registration for the magento visitors using custom steps. I need to create a wizard that helps the users to follow a path previously set in the administration panel.
At the moment I have created the extension but I am having some difficulties to create the front-end wizard form. What I'd like to achieve is a multi registration form where if the user go from the first form to the second one Magento has to save the data and wait if the user wants to go on the next new form and so on...
Here a mockup: http://minus.com/lF3krBVJG0WEM
How have I to create a multiform that follow this behaviour?
Regards

Resources