Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Hello all, .. I'm getting this error on the Order Complete Page when using Direct Bank Deposit payment method.:

    1406 Data too long for column 'shipping_method' at row 1
    in:
    [INSERT INTO zc1_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', 'Hoho Hoe', '', '55', 'ggggw Rd', 'Mgggggld', '5144', 'South Australia', 'Australia', '5555555', 'hogggo@noisp.net.au', '1', 'Hoho Hoe', '', '55', 'Hilggggw Rd', 'Mgggggd', '5144', 'South Australia', 'Australia', '1', 'Hoho Hoe', '', 'sec 2755', 'Hsseffw Rd', 'Maggggd', '5144', 'South Australia', 'Australia', '1', 'Direct Bank Deposit', 'dirbank', 'AustPost (\"Registered 3 \"days)', 'austpost', '', '', '', '', '', now(), '1', '183.35', '15.445454545455', 'AUD', '1.00000000', '127.0.0.1 - 127.0.0.1')]

    (Some of the values changed for security reasons)
    Apparently its something to do with shipping_method varchar(128)

    How and where do I change this setting and what value should it be set to ?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,186
    Plugin Contributions
    7

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Quote Originally Posted by remoteone View Post
    Hello all, .. I'm getting this error on the Order Complete Page when using Direct Bank Deposit payment method.:

    1406 Data too long for column 'shipping_method' at row 1
    in:
    [INSERT INTO zc1_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', 'Hoho Hoe', '', '55', 'ggggw Rd', 'Mgggggld', '5144', 'South Australia', 'Australia', '5555555', 'hogggo@noisp.net.au', '1', 'Hoho Hoe', '', '55', 'Hilggggw Rd', 'Mgggggd', '5144', 'South Australia', 'Australia', '1', 'Hoho Hoe', '', 'sec 2755', 'Hsseffw Rd', 'Maggggd', '5144', 'South Australia', 'Australia', '1', 'Direct Bank Deposit', 'dirbank', 'AustPost (\"Registered 3 \"days)', 'austpost', '', '', '', '', '', now(), '1', '183.35', '15.445454545455', 'AUD', '1.00000000', '127.0.0.1 - 127.0.0.1')]

    (Some of the values changed for security reasons)
    Apparently its something to do with shipping_method varchar(128)

    How and where do I change this setting and what value should it be set to ?
    I've not seen that particular error message before, but I can speculate the cause based on a couple of similar things I've read, and it probably relates to the AustPost module rather than the Direct Deposit module.

    There are 3 things that you can do.

    1. Increase the size of the data field for the shipping_method from 128 to 256.

    2. load the file /includes/languages/english/modules/shipping/austpost.php into a text editor and then edit the line that contains MODULE_SHIPPING_AUSTPOST_TEXT_TITLE by removing the image tags (replace it with plain text).

    3. Upgrade your AustPost shipping module by replacing it with the 'ozpost' Shipping module (which has taken care of the problem associated with fix#2).

    I would suggest that to 'prove the point' fix#2 will be the quickest and safest thing to do. If this confirms the fix, then consider implementing fix#3.

    Fix#1 should only be considered if fix#3 causes other unrelated problems AND you want to keep the AustPost icons.

    Cheers
    Rod

  3. #3
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    I see that , upon initial installation, zc sets the value of shipping_method in the orders table to 128
    I changed this to 256 using phpMyAdmin but still get same error with Direct Bank Deposit module.
    All help greatly appreciated.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,186
    Plugin Contributions
    7

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Quote Originally Posted by remoteone View Post
    I see that , upon initial installation, zc sets the value of shipping_method in the orders table to 128
    I changed this to 256 using phpMyAdmin but still get same error with Direct Bank Deposit module.
    All help greatly appreciated.
    I still think it is the same problem (and solution) previously discussed. You could try increasing the field width even further, say 512, and possibly even 1024. Doing so won't affect the way things work, it'll just increase the size of your database. However, it WILL cause you a problem if you ever reduce the size back to the original, because any existing data would end up being truncated.

    Cheers
    Rod

  5. #5
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Hi RodG, Didnt see your post till I had saved that last post.
    1. Did I change the correct dB table? ie orders : shipping_method
    2. Thanks for the suggestions, I wanted to get rid if the austpost_logo.jpg image anyway.. Have replaced w 'AustPost'. I removed it all together using "define('MODULE_SHIPPING_AUSTPOST_TEXT_TITLE' , ' ');" .note must use a space ' ' not ''.
    Still getting the error tho'
    3. Hmmm. ..another module , another week of debugging..Still, i'll give it a go as fix1 & fix2 have made no difference

    Maybe I need to also remove austpost.jpg ?
    Cheers
    Last edited by remoteone; 29 Mar 2009 at 02:41 AM.

  6. #6
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Ok , I change the value of the value of shipping_method in the orders table to 1024,
    now I have another similar error:

    1406 Data too long for column 'title' at row 1
    in:
    [INSERT INTO zc1_orders_total (orders_id, title, text, value, class, sort_order) VALUES ('18', ' (\"Registered 3 \"days):', '$13.45', '13.45', 'ot_shipping', '200')]

  7. #7
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Ok
    I changed table orders_total title value to 1024
    I think its working now.

    RodG this prompts another question, how remove the ( that preceeds austpost_regd.jpg and the ): that follows austpost_del.jpg ?
    They look a bit odd there next to the images

    (Registered Parcel Post 3 days Est Delivery):
    alternatively
    maybe replace the austpost_regd.jpg and austpost_del.jpg image references w text.
    Thanks

  8. #8
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Hmmm ..this is something that should be fixed for the ZenCart installation .
    These SQL tables need to be set larger in case shops want to use AustPost and Direct Bank Deposit .. much time wasted on such a fundamental issue.

    Thanks for your help, your a champion RodG !

  9. #9
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    To avoid this on inital install, changing the lines in \zencart\zc_install\sql\mysql_zencart.sql prior to install might do the trick.
    or maybe a sqlQuery file included with DBD and/or AustPost modules downloads

    CREATE TABLE orders (
    shipping_method varchar(1024) NOT NULL default '',

    and
    CREATE TABLE orders_total (
    title varchar(1024) NOT NULL default '',

    Thanks again.

  10. #10
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,186
    Plugin Contributions
    7

    Default Re: Direct Bank Deposit - 1406 Data too long for column 'shipping_method'

    Quote Originally Posted by remoteone View Post
    Hmmm ..this is something that should be fixed for the ZenCart installation .
    These SQL tables need to be set larger in case shops want to use AustPost and Direct Bank Deposit
    I kinda disagree, I'm sure the zencart developers chose the smaller field size for a reason, and by making it bigger to compensate for the AustPost issue is only really hiding the problem. The fact is, the module "titles" were never intended to be replaced with icons/images, and by doing so with the AustPost module I actually deviated from the standard.

    This is/was one of the things that I have rectified in the 'ozpost' module.

    Cheers
    Rod

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Direct Bank Deposit -- is there one for v1.5.4?
    By jolliejollie in forum Addon Payment Modules
    Replies: 1
    Last Post: 13 Apr 2015, 01:52 PM
  2. v154 Module for Paying Bill through Bank Account / Direct Bank Deposit
    By jolliejollie in forum Addon Payment Modules
    Replies: 0
    Last Post: 23 Mar 2015, 06:04 PM
  3. Direct Bank Deposit - Can I add more than 1 bank account?
    By wanor in forum Addon Payment Modules
    Replies: 0
    Last Post: 27 Oct 2010, 05:56 PM
  4. 1406 Data too long for column "last_page_url" at row 1
    By time4fishing in forum PayPal Website Payments Pro support
    Replies: 2
    Last Post: 11 Jan 2008, 01:00 AM
  5. Data too long for column 'shipping_method' - Big Royal Mail
    By pwhyles in forum Addon Shipping Modules
    Replies: 3
    Last Post: 9 Nov 2006, 08:49 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR