Zen Cart Logo
Forums / Bug Reports / [Not a core bug] Length mismatch between order_products and products_description

[Not a core bug] Length mismatch between order_products and products_description

Views: 2,054

Results 1 to 2 of 2
6 Feb 2020, 6:32 AM
#1
kskjon avatar

kskjon

New Zenner

Join Date:
Feb 2020
Posts:
1
Plugin Contributions:
0

[Not a core bug] Length mismatch between order_products and products_description

Hello

I have discovered that the products_name column in the orders_products table is 64 characters, while the products_name column in products_description is 128 characters.
This becomes a problem if a customer orders a product where the name is between 64 and 128 characters. When he/she clicks to confirm the order, ZC crashes and just some of the order lines get added.

Best regards
Kjetil

6 Feb 2020, 10:09 AM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: [Not a core bug] Length mismatch between order_products and products_description

This is a typical issue when someone chooses to try to increase the length of this field and others that are tracked through the order process and other related processes.

(eg: in Zen Cart v1.5.6 both tables are set to 64 characters by default)

It should be possible to resolve the issue through the following SQL statement that can be applied through tools->Install SQL Patches

ALTER orders_products MODIFY products_name VARCHAR(128);

It is recommended to make a backup of the database before executing commands that modify the database structure.