Hi there:
In step 7 show this errror
http://vvcap.com/lvCmghY6rkn
[error] [ub_data_migration] CDbCommand failed to execute the SQL statement: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column ‘expiration_date’ at row 1. The SQL statement executed was: INSERT INTO `salesrule_coupon` (`times_used`, `type`, `rule_id`, `code`, `usage_per_customer`, `expiration_date`, `is_primary`, `created_at`) VALUES (:yp0, :yp1, :yp2, :yp3, :yp4, :yp5, :yp6, :yp7)
I have registers null in this field. Can this be the mistake?
http://vvcap.com/5vOdNUMhkFf
Thanks regards.
5 answers
Hi there,
I have registers null in this field. Can this be the mistake?
Yes, let’s do it and you can continue with data migration. And tell me know how it goes.
Regards,
Mall.
Hi there, the problem was a register 0000-00-00 00:00:00 in ‘expiration_date’
Regards.
Hi there,
the problem was a register 0000-00-00 00:00:00 in ‘expiration_date’
So, let’s do steps as bellow:
-- Open the php file at pub/ub-tool/protected/controllers/Step7Controller.php
and find to the code line:
$coupon2->rule_id = $salesRule2->rule_id;
and replace it by code lines:
$coupon2->rule_id = $salesRule2->rule_id;
if (empty($coupon2->expiration_date) || $coupon2->expiration_date === '0000-00-00 00:00:00') {
$coupon2->expiration_date = date("Y-m-d H:i:s");
}
Once done, you can continue with data migration in the step #7.
Regards,
Mall.
Thanks Mail, I have changed the value of register because this register was old and I could modify this.
But I keep you solution.
Hi there,
Yes, let’s continue and contact me if you need further assistance.
Regards,
Mall.