Forums / Addon Shipping Modules / Data too long for column 'shipping_method' - Big Royal Mail

Data too long for column 'shipping_method' - Big Royal Mail

Locked

Views: 3,957

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
8 Nov 2006, 6:40 AM
#1
pwhyles avatar

pwhyles

New Zenner

Join Date:
Nov 2006
Posts:
11
Plugin Contributions:
0

Data too long for column 'shipping_method' - Big Royal Mail

Newbe (3 days 'using' ZenCart); this may not be the best place to ask?

ZenCart v1.3.6 with big_royal_mail_2.0 shipping modules installed.
I'm running a test set-up via localhost/Apache 2.0.54 : MySql 5.0.21 (neither up to date; I'm behind a hardware firewall that blocks everything) on Windows XPhomeSP2 (fully patched).

I'm running through testing products from insertion to sale and have altered very little else, as yet; aiming to learn the important (IMO) stuff first.

I get the following on completion of the checkout process (the user is fictitious, of course).

1406 Data too long for column 'shipping_method' at row 1
in:
[INSERT INTO orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, payment_module_code, shipping_method, shipping_module_code, coupon_code, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, order_total, order_tax, currency, currency_value, ip_address) VALUES ('2', 'Maud Moonshine', '', 'Cackles Accedemy', '', 'Hollyhead', 'H66 666', 'Hollyhead', 'United Kingdom', '0123 456789', '[email protected]', '6', 'Maud Moonshine', '', 'Cackles Accedemy', '', 'Hollyhead', 'H66 666', 'Hollyhead', 'United Kingdom', '6', 'Maud Moonshine', '', 'Cackles Accedemy', '', 'Hollyhead', 'H66 666', 'Hollyhead', 'United Kingdom', '6', 'Check/Money Order', 'moneyorder', 'Royal Mail 2nd Class *(Great Britain and Northern Ireland only : 0.550 kg(s))', 'rm2ndpacket', '', '', '', '', '', now(), '1', '13.77', '0', 'GBP', '1.00000000', '127.0.0.1 - 127.0.0.1')]

(The change to italics shown in the editer here (it may not show when posted) is in the original as copied and pasted from MSIE, not by me [perhaps that's the problem? a char-code MYsql does not like? I'll have to think about that]).

On checking I see that shipping_method is VARCHAR(128) and that the data item being inserted into it, above, is less than 128 characters, so it should be ok, in theory.

Can't find anything here by searching, so it's likely something specific to me/my set-up.

Now I'm no great sql expert so I'm probably missing something obvious; help appreciated.

8 Nov 2006, 2:38 PM
#2
pwhyles avatar

pwhyles

New Zenner

Join Date:
Nov 2006
Posts:
11
Plugin Contributions:
0

Re: Data too long for column 'shipping_method' - Big Royal Mail

Since this morning I've run the query independently of ZenCart and it updates perfectly: so there is nothing wrong with the query or the MySqul table.

I've also reinstalled Flat Rate and Per Item shipping options into ZenCart and both of these work; correctly updating the Orders table, no errors; so that rules out a problem with ZenCart?

So it looks like I've done something wrong, or misunderstood something, with big_royal_mail_2.0; but I can't think what, the sql query should update...

9 Nov 2006, 7:29 AM
#3
pwhyles avatar

pwhyles

New Zenner

Join Date:
Nov 2006
Posts:
11
Plugin Contributions:
0

Re: Data too long for column 'shipping_method' - Big Royal Mail

In the absence of any other suggestions I've simply increased the size of shipping_method, which gets over the problem.

It does not, however, explain why a sting shorter than the maximum originally set for shipping_method should be rejected; I don't like it, but it will have to wait for another day.

9 Nov 2006, 7:49 AM
#4
pwhyles avatar

pwhyles

New Zenner

Join Date:
Nov 2006
Posts:
11
Plugin Contributions:
0

Re: Data too long for column 'shipping_method' - Big Royal Mail

... and that day came sooner than I thought.

Now I've got it working I see that big_royal_mail_2.0 is writing to shipping_method strings such as:

Royal Mail 2<sup>nd</sup> Class <i style="font-weight: normal">"Packet"</i> (Great Britain and Northern Ireland only : 0.550 kg(s))

which is indeed larger than the 128 characters shipping_method is set to on install. Hmmmm....

Problem solved (hopefully nothing will break further down the line due to these extra long strings; untill I've altered them).

I find it difficult to comprehend that this problem has not occured previously?