Symptom
1. At back office Orders tab you will find the order date are empty in the list
2. At order details page, all date fields are left as empty
3. If you set "display_errors" to "on" in /config/config.inc.php, you will find following errors
Notice: Undefined index: date_format_full in ....\www\prestashop\
Cause
If this issue happened at your store, it indicated that your store was not installed correctly. Some data fields in database are missed. See below highlighted in red.
How to fix the problem?
In order to fix this problem you will need to add those missing field to database.
You can run following scripts to fix the issue.
ALTER TABLE `ps_lang` ADD `date_format_lite` char(32) NOT NULL DEFAULT 'Y-m-d' AFTER language_code;
ALTER TABLE `ps_lang` ADD `date_format_full` char(32) NOT NULL DEFAULT 'Y-m-d H:i:s' AFTER date_format_lite;
UPDATE `ps_lang` SET `date_format_lite` = 'd/m/Y' WHERE `iso_code` IN ('fr', 'es', 'it');
UPDATE `ps_lang` SET `date_format_full` = 'd/m/Y H:i:s' WHERE `iso_code` IN ('fr', 'es', 'it');
UPDATE `ps_lang` SET `date_format_lite` = 'd.m.Y' WHERE `iso_code` = 'de';
UPDATE `ps_lang` SET `date_format_full` = 'd.m.Y H:i:s' WHERE `iso_code` = 'de';
UPDATE `ps_lang` SET `date_format_lite` = 'm/d/Y' WHERE `iso_code` = 'en';
UPDATE `ps_lang` SET `date_format_full` = 'm/d/Y H:i:s' WHERE `iso_code`= 'en';
After you run the script. the problem should be fixed.
No comments:
Post a Comment