Zen Cart Logo
Forums / General Questions / Receiving an error when trying to copy a product

Receiving an error when trying to copy a product

Locked

Views: 874

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
16 Sep 2008, 1:43 PM
#1
marg2610 avatar

marg2610

New Zenner

Join Date:
Sep 2008
Posts:
8
Plugin Contributions:
0

Receiving an error when trying to copy a product

Hello all, I am recieving the following error when trying to copy a category or product:

1292 Incorrect datetime value: '' for column 'products_date_available' at row 1
in:
[insert into ad_products (products_type, products_quantity, products_model, products_image, products_price, products_virtual, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_price_sorter, master_categories_id ) values ('1', '500', '', 'Briard.jpg', '25.0000', '0', now(), '', '0','1', '0', '0', '1', '1', '0', '0', '0', '1', '1', '1', '0', '37', '25.0000', '574')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

We are using the latest version of Zen Cart and that's about all I know. We were with direct nic then switched over to our own windows server and this is when we started recieving this error. Any help is much appreciated, thank you.

16 Sep 2008, 2:13 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Receiving an error when trying to copy a product

Looks like a database issue, but may be tied up with your new server's date formatting/configuration. (eg: you may have added the original data (on your earlier server) using a date format of DD/MM/YYYY and the new server is configured MM/DD/YYYY)... Or something like that.

Check what format your original data's dates are, and see if this differs from the way your new server formats the date.

16 Sep 2008, 4:48 PM
#3
marg2610 avatar

marg2610

New Zenner

Join Date:
Sep 2008
Posts:
8
Plugin Contributions:
0

Re: Receiving an error when trying to copy a product

Thank you for your help. I tried switching the date on our windows server and I'm still getting an error when attempting to copy. Would it be possible that the images are somehow preventing it from copying? I ask this because I keep seeing an image file name in the error.

17 Sep 2008, 1:50 PM
#4
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Receiving an error when trying to copy a product

No, nothing to do with the image.

If you look at the error:-

1292 Incorrect datetime value: '' for column 'products_date_available' at row 1
in:
[insert into ad_products (products_type, products_quantity, products_model, products_image, products_price, products_virtual, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_quantity_order_min, products_quantity_order_units, products_priced_by_attribute, product_is_free, product_is_call, products_quantity_mixed, product_is_always_free_shipping, products_qty_box_status, products_quantity_order_max, products_sort_order, products_price_sorter, master_categories_id ) values ('1', '500', '', 'Briard.jpg', '25.0000', '0', now(), '', '0','1', '0', '0', '1', '1', '0', '0', '0', '1', '1', '1', '0', '37', '25.0000', '574')]

Put another way, the system is trying to insert the following values into the table, according to the following fields:-

insert into ad_products, THE FOLLOWING VALUES
products_type, 1 1 means active
products_quantity, 500
products_model, **THIS FIELD IS EMPTY as denoted by **‘’
products_image, Braird.jpg
products_price, 25.0000
products_virtual, 0 0 means inactive
products_date_added, now()
products_date_available, **THIS FIELD IS EMPTY as denoted by **‘’
products_weight, 0
products_status, 1
products_tax_class_id, 0
manufacturers_id, 0
products_quantity_order_min, 1
products_quantity_order_units, 1
products_priced_by_attribute, 0
product_is_free, 0
product_is_call, 0
products_quantity_mixed, 1
product_is_always_free_shipping, 1
products_qty_box_status, 1
products_quantity_order_max, 0
products_sort_order, 37
products_price_sorter, 25.0000
master_categories_id, 574

As you can see, the SQL has no value for products_date_available, it's empty (as denoted by ''), so you could try this.

On a test product, open the product to edit it in ZC Admin.

Insert a Date into its Product Available Date field.

Then try to copy it.

This may allow the product data to be copied.

Just why your dbase is misbehaving like this I don't know, but I still contend it's something to do with the MS server...

17 Sep 2008, 5:49 PM
#5
marg2610 avatar

marg2610

New Zenner

Join Date:
Sep 2008
Posts:
8
Plugin Contributions:
0

Re: Receiving an error when trying to copy a product

Products seem to copy fine, it's when I copy a whole category it throws this error. Sorry for the confusion. I've tried all the different date formats on the server and I still get the error. My previous webhost was direct nic and I'm not sure what format they were using.

17 Sep 2008, 7:15 PM
#6
marg2610 avatar

marg2610

New Zenner

Join Date:
Sep 2008
Posts:
8
Plugin Contributions:
0

Re: Receiving an error when trying to copy a product

Nope I lied, I've stumbled across a product that throws the same error when trying to copy it even after I put a date in the Product Available Date field. In the mean time I have contacted directnic to see what date format they use but I don't expect to hear back from them for another two weeks.