Jump to content

[Solved] Step 3 Installation Error : 1364


Recommended Posts

Error while inserting data into the database:
'INSERT INTO `ps_cart_product` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`) VALUES (1, 7, 23, 1)'
Field \'date_add\' doesn\'t have a default value(Error: : 1364)

Above is the error that I get when trying to install PS v1.1 on MySQL 5.1. Can anyone assist me with this issue?

Thanks,

Link to comment
Share on other sites

The error seems to be due to the fact that I am using Full Mode and not Simple Mode. Browse to \install\sql\db_settings_extends.sql. Open the file and edit the following lines of code.

INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`) VALUES (1, 7, 23, 1);
INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`) VALUES (1, 9, 0, 1);



Replace them with the below code. And boom! You fixed your problem.

INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`, `date_add`) VALUES (1, 7, 23, 1, NOW());
INSERT INTO `PREFIX_cart_product` (`id_cart`, `id_product`, `id_product_attribute`, `quantity`, `date_add`) VALUES (1, 9, 0, 1, NOW());

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...