Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2006
    Location
    Mesa, Arizona USA
    Posts
    39
    Plugin Contributions
    0

    Default HOW DO I? Shipping address is never required

    My brother has a local car wash. In my effort to help him, I've started to implement a zen-cart solution for him so his customers and actually select the services they want and pre-pay (which intitles them to a discount). I've set the categories up and added the three sub categories to each with 4 attributes to each of those. The check out process works great, across the board disounts works great (thanks to the mod by ???) however, when I get to step three of the checkout process (confirm the order) I get a

    1264 Out of range value adjusted for column delivery_address_format_id' 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 ('1', 'Daniel Smyers', 'WEBTEAM', '8114 East B', '', 'Mesa', '85207', 'Arizona', 'United States', '480-984-9562', 'djsmyers##########################', '2', ' ', '', '', '', '', '', '', '', '', 'Daniel Smyers', 'WEBTEAM', '8114 East B', '', 'Mesa', '85207', 'Arizona', 'United States', '2', 'Credit Card', 'cc', 'Free Shipping', 'free', '', 'Visa', 'Daniel Smyers', '4111XXXXXXXX1111', '0108', now(), '1', '54', '0', 'USD', '1.00000000', '127.0.0.1 - 127.0.0.1')]

    Attached are two screen shots for configuration.

    How do I get around this?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	attributes_controller.JPG 
Views:	251 
Size:	81.3 KB 
ID:	1401   Click image for larger version. 

Name:	product.JPG 
Views:	259 
Size:	56.5 KB 
ID:	1402  
    [FONT=Book Antiqua]Daniel Smyers[/FONT]
    It can be done, it's just a matter of by who!!!!

    Support your Zen team, they work hard to get this right for you. The least YOU could do is buy them a cup of coffee. Visit the zen cart donation page (click here)

  2. #2
    Join Date
    Dec 2006
    Location
    Mesa, Arizona USA
    Posts
    39
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    Quote Originally Posted by djsmyers View Post
    (thanks to the mod by ???)
    If I going to give credit to a mod, than I best mention by whom.

    Mod: Quantity Discounts version 1.4
    By: Scott Wilson (swguy)
    At: http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_61&products_id=235

    This mod saved me a lot of effort in configuration.
    [FONT=Book Antiqua]Daniel Smyers[/FONT]
    It can be done, it's just a matter of by who!!!!

    Support your Zen team, they work hard to get this right for you. The least YOU could do is buy them a cup of coffee. Visit the zen cart donation page (click here)

  3. #3
    Join Date
    Jun 2003
    Posts
    33,825
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    On the shipping - mark all of your products as virtual- no shipping required. the shipping with be skipped.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  4. #4
    Join Date
    Dec 2006
    Location
    Mesa, Arizona USA
    Posts
    39
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    Thank you for the response Kim. I have marked all products as virtual, as a result, the 1264 error occurs. I really didn't want to make a core change, but should I just comment out line 595 in includes/classes/orders.php

    //'delivery_address_format_id' => $this->delivery['format_id'],

    or hard code the line to read

    'delivery_address_format_id' => '1',

    I tried changing the table structure to allow nulls, default to 1, and default to 0 to no avail. I'm not to bad when it comes to coding (not to good either). I was just wondering if the cart requires a shipping address regardless of settings. Anyways, I'm at a loss (what's new).

    Some configurations options with the virtual products I tried was setting Always free shipping to special, then to no, then to yes. Same error.

    Now I know what happens with a commented line of code, I get this error:

    1366 Incorrect decimal value: 'f' for column 'value' at row 1 in:
    [INSERT INTO orders_total (orders_id, title, text, value, class, sort_order) VALUES ('2', 'Free Shipping:', '$0.00', 'f', 'ot_shipping', '200')]

    Hardcoded with 0 or 1 generates the same error.
    [FONT=Book Antiqua]Daniel Smyers[/FONT]
    It can be done, it's just a matter of by who!!!!

    Support your Zen team, they work hard to get this right for you. The least YOU could do is buy them a cup of coffee. Visit the zen cart donation page (click here)

  5. #5
    Join Date
    Dec 2006
    Location
    Mesa, Arizona USA
    Posts
    39
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    I woke up and smelled some roses. The problem was the value had a charactor attached to it (ie 148.0f). By making a small change in includes/classes/order.php I fixed the second error (I hope I didn't make myself a new one). I add the builtin function 'floatval' to the element 'value' of the sql array for the table orders total insert. In other words, (okay you can kick me later drbyte for messing with your code) I changed

    PHP Code:
       for ($i=0$n=sizeof($zf_ot_modules); $i<$n$i++) {
          
    $sql_data_array = array('orders_id' => $insert_id,
                                  
    'title' => $zf_ot_modules[$i]['title'],
                                  
    'text' => $zf_ot_modules[$i]['text'],
                                  
    'value' =>$zf_ot_modules[$i]['value'],
                                  
    'class' => $zf_ot_modules[$i]['code'],
                                  
    'sort_order' => $zf_ot_modules[$i]['sort_order']);
          
    zen_db_perform(TABLE_ORDERS_TOTAL$sql_data_array);
        } 
    to

    PHP Code:
        for ($i=0$n=sizeof($zf_ot_modules); $i<$n$i++) {
          
    $sql_data_array = array('orders_id' => $insert_id,
                                  
    'title' => $zf_ot_modules[$i]['title'],
                                  
    'text' => $zf_ot_modules[$i]['text'],
                                  
    'value' => floatval($zf_ot_modules[$i]['value']),
                                  
    'class' => $zf_ot_modules[$i]['code'],
                                  
    'sort_order' => $zf_ot_modules[$i]['sort_order']);
          
    zen_db_perform(TABLE_ORDERS_TOTAL$sql_data_array);
        } 
    everything seems to work as expected during checkout.
    [FONT=Book Antiqua]Daniel Smyers[/FONT]
    It can be done, it's just a matter of by who!!!!

    Support your Zen team, they work hard to get this right for you. The least YOU could do is buy them a cup of coffee. Visit the zen cart donation page (click here)

  6. #6
    Join Date
    Apr 2007
    Posts
    1
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    Quote Originally Posted by djsmyers View Post
    I woke up and smelled some roses. The problem was the value had a charactor attached to it (ie 148.0f). By making a small change in includes/classes/order.php I fixed the second error (I hope I didn't make myself a new one). I add the builtin function 'floatval' to the element 'value' of the sql array for the table orders total insert. In other words, (okay you can kick me later drbyte for messing with your code) I changed

    PHP Code:
       for ($i=0$n=sizeof($zf_ot_modules); $i<$n$i++) {
          
    $sql_data_array = array('orders_id' => $insert_id,
                                  
    'title' => $zf_ot_modules[$i]['title'],
                                  
    'text' => $zf_ot_modules[$i]['text'],
                                  
    'value' =>$zf_ot_modules[$i]['value'],
                                  
    'class' => $zf_ot_modules[$i]['code'],
                                  
    'sort_order' => $zf_ot_modules[$i]['sort_order']);
          
    zen_db_perform(TABLE_ORDERS_TOTAL$sql_data_array);
        } 
    to

    PHP Code:
        for ($i=0$n=sizeof($zf_ot_modules); $i<$n$i++) {
          
    $sql_data_array = array('orders_id' => $insert_id,
                                  
    'title' => $zf_ot_modules[$i]['title'],
                                  
    'text' => $zf_ot_modules[$i]['text'],
                                  
    'value' => floatval($zf_ot_modules[$i]['value']),
                                  
    'class' => $zf_ot_modules[$i]['code'],
                                  
    'sort_order' => $zf_ot_modules[$i]['sort_order']);
          
    zen_db_perform(TABLE_ORDERS_TOTAL$sql_data_array);
        } 
    everything seems to work as expected during checkout.
    I am having the exact same problem with a download. Works fine if I choose something that has to be shipped but when there is no shipping I get the same error. I changed my code to the moded code you posted but still same thing. Did you change anything else or was that it?

    Thanks,
    Brett

  7. #7
    Join Date
    Dec 2006
    Location
    Mesa, Arizona USA
    Posts
    39
    Plugin Contributions
    0

    Default Re: HOW DO I? Shipping address is never required

    Those are the only changes I made. I installed the Quantity Discount Mod, marked all products virtual, and made that single line change in the code. If you could get me a screen shot of the actual error, maybe I could take a look and see what might be happening. I'm not much of a coder, but I am darn good with debugging and streamlining code others have developed.
    [FONT=Book Antiqua]Daniel Smyers[/FONT]
    It can be done, it's just a matter of by who!!!!

    Support your Zen team, they work hard to get this right for you. The least YOU could do is buy them a cup of coffee. Visit the zen cart donation page (click here)

 

 

Similar Threads

  1. Tax not changing with Shipping address
    By arpeggio in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 4
    Last Post: 4 Jan 2007, 06:36 AM
  2. Replies: 0
    Last Post: 30 Dec 2006, 02:25 AM
  3. Shipping address disappears
    By rpain in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 31 Jul 2006, 05:34 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
  •