Search code examples
magento

Change the Date of a Review in Magento


Magento reviews follow this format:-

  • Summary
  • Body of Review
  • Date of Review

I need to change the date of the review to a custom date.

Please could somebody guide me on how to go about doing this? I have tried editing the review in the back-end, but the only sections I can change are the Summary and the Body of the review.

If you could let me know where in the database I should change, I'd really appreciate it. Or, if there is a way to change this in the back-end, without installing an extension, that'd be really awesome.


Solution

  • Preface

    The Magento Admin backend does not have a place to edit the date of a product review. You must do this directly in the SQL database or programmatically.

    The following instructions will help you change it directly in the SQL database.


    1.) Find The Review ID

    Login to your Magento backend Admin area and go here in the menu:

    Magento Admin >> Catalog >> Reviews and Ratings >> Customer Reviews >> All Reviews

    In the resulting table of all reviews, find the single review you want to change the date for. Do not click into the review because the ID is only shown in the table of all reviews.

    Remember that ID


    2.) Change the Date in the Database

    I used PhpMyAdmin to get access to my Magento SQL database. You can use whatever SQL Management Platform suits you.

    1. Login to your SQL database and navigate the the table named only 'review'.
    2. In that table you will see a column called 'review_id'.
    3. Find the row in the 'review.review_id' column that matches the ID of the review you want to change the Magento date for.
    4. Click 'Edit' on that row and change the 'created_at' value of it.
    5. Save your changes to the row by clicking 'Go'.

    You're done.

    Check Magento to make sure it displays the updated date.


    Helpful Hints

    • The date value in 'created_at' must be in the format of an SQL date-time. This is 'YYYY-MM-DD hh:mm:ss'.
    • Magento is sensitive to timezones. You may need to adjust the date value you use to compensate for this - so it displays the way you want it.
    • The SQL 'review' table was not listed on my first page of table names in PhpMyAdmin. To find it, I had to click through to the second page of table names.
    • It is very easy to ruin your website by clicking the wrong things in PhpMyAdmin. So don't screw around in there.