Question

I have 3 store view to my website and I want to have a part in my home page where the guest can evaluate my store (not the product) and the only authenticated customer can evaluate and save directly their opinion but not logged in will be redirected to the login page to save the evaluation. So how to do that thanks in advance

Was it helpful?

Solution

You build a custom module. Key important things to have are:

  1. The module exposes new entity named evaluation. This entity will be supported by its own model, resource model and collection. Among other things it will store customer_id so you know which customer did exactly which evaluation

  2. The module exposes a frontend block that basically has a form that will receive the evaluation. This could be a star rating, like 1-5 stars, plus maybe a text area for a general comment. This is up to you. But any inputs should be indeed combined into one form.

  3. The module has one frontend controller that accepts the request and process it. Of course all processing would happen if there is a logged in user in session.

  4. The module will have an admin grid that would list evaluations and calculate the average score.

Besides this essence, you could play around with a couple of extras:

  1. Send email to the administrator each time there is a new evaluation

  2. Allow multiple evaluations v.s. allow one time evaluations - this would be configuration

As far as module complexity, I'd say it is fairly simple module, unless you are new with Magento. But even if you are, this could be a very good opportunity to learn.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top