Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26
  1. #11
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete Option

    So, I've continued to kick this issue around, and I have a couple of questions.

    Into what file would I put this form? Would I code it like a normal HTML form, or is there some kind of "handler" for this? Something like the
    PHP Code:
    <?php echo zen_draw_textarea_field('comments''45''3'); ?>
    I realize that I would, of course, not need a text field, but a checkbox, so the verbiage would be different, but I was wondering if there already was something created for this. This is probably a dumb question, and I'm definitely showing my ineptitude with PHP, but I reckon a dumb question asked is better than a dumb question unasked.

    If I could just get the blasted checkbox to show up I think I'd be good from there. I'm at least familiar with the
    PHP Code:
    zen_db_prepare_input 
    command that prepares the following data for database insertion.

    Finally...would I need to store this data into the $_SESSION superglobal? I'm inclined to say yes, but I'm not sure. Any help is appreciated.

    I totally know that I'm in over my head. Please be merciful.
    Last edited by jdw1979; 27 Apr 2010 at 05:22 PM. Reason: Emphasizing my "noobiness."

  2. #12
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Ship Complete Option

    What exactly are you trying to collect and where do you want to collect it?
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #13
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete Option

    AH HA! PROGRESS! I figured out which file I needed to edit for my form to appear! /template_default/tpl_checkout_shipping.php was the file I was looking for. Once I figured that out it was as simple as creating my form. Now.,..I gotta get the radio button data to insert into the database, and then be output again in the admin...it's gonna be tricky, I think, but I very well may make it happen. Once I figure it all out I'll post my full solution.

  4. #14
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete Option

    Hmm...the struggle goes on.

    I guess now I'm at the part where I should really be paying attention to the way the comments are handled. I've got my form to appear, but now I'm having a difficult time figuring out how to insert the data collected via these two radio buttons into the 'zen_orders' table.

    Basically...here's what I've got. I know it's way way wrong (otherwise it would be working, lol) but I reckon my best bet is to post my pathetic code and hope:

    This is what I've added to tpl_checkout_shipping.php

    PHP Code:
    <fieldset>
    <legend>Ship Complete</legend>
    To keep shipping costs to a minimum, we ship orders complete unless otherwise requested. If you would like to accept a partial shipment in the event your order contains some in-stock and some non-stock products, please choose "yes" below: <br/><br/>
    <form id="splitshipment" name="splitshipment" method="post" input type="submit" action="submit">
      <label>
      <input name="ship_complete_yes" type="radio" value="Yes" />
        Yes</label><label>
        <input name="ship_complete_no" type="radio" value="No" />No</label>
    </form>
    <?php $sql="INSERT INTO zen_orders ".
           
    "(ship_complete) ".
           
    "VALUES ".
           
    "('$splitshipment')";?>

    </fieldset>

  5. #15
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete vs Partial Ship option?

    Yeah...crap. That's all kinds of wrong. I'm embarrassed to even have that posting there. I still haven't figured out how to do it yet, but I'm workin' on it.

  6. #16
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Ship Complete vs Partial Ship option?

    You are trying to insert a new field into the orders table ...

    But, you are trying to do this at the wrong point ...

    Gather the information to a $_SESSION variable such as $_SESSION['ship_complete'] where the value is 0 or 1 ...

    Then in the order.php if you were to follow everywhere the ip_address is managed ... that is where you need to add your ship_complete ...

    Now so that the data is managed in all the other files of the checkout right ... look how the comment is handled ... and you would use your ship_complete in the same manner so that it carries from page to page ...

    So "collecting" the information for the new field ship_complete follows the comment ... and "adding" the new field ship_complete follows the ip_address ...

    Easy smeazy ... eh?!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #17
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete vs Partial Ship option?

    Screw it. I give up. I went to /includes/languages/english/checkout_shipping.php and added
    PHP Code:
    define('TABLE_HEADING_COMMENTS''Special Instructions or Comments About Your Order:<br/><br/>All orders will ship complete unless otherwise noted here:'); 
    How about that for a simple solution, eh?

  8. #18
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete vs Partial Ship option?

    Crap. Sorry Ajeh...I didn't see your post before I wrote my last one! My bad! I'll totally give it another whirl now that I've gotten a little guidance! Thank you so much!

  9. #19
    Join Date
    Jun 2009
    Location
    NC
    Posts
    174
    Plugin Contributions
    1

    Default Re: Ship Complete vs Partial Ship option?

    Ok...so...the files I need to edit are:

    /includes/classes/order.php

    /includes/modules/pages/checkout_shipping/header_php.php

    /includes/modules/pages/checkout_process/header_php.php

    /includes/includes/modules/pages/checkout_payment/header_php.php

    /includes/modules/pages/checkout_confirmation/header_php.php


    The header.php files are the ones that carry the $_SESSION data from one page to the other...right?

  10. #20
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Ship Complete vs Partial Ship option?

    That is correct ... look in the header_php files for how the $_SESSION['comments'] is managed and used so not to lose the comments from page to page between the variable $comments and $_SESSION['comments'] ...

    Then do a search in the order.php class for how the ip_address is put into the orders table ...

    Just follow the bouncing balls ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. v151 Drop Ship and regualr ship into one setup?
    By amart79196 in forum Addon Shipping Modules
    Replies: 12
    Last Post: 1 Apr 2014, 04:10 PM
  2. Replies: 11
    Last Post: 30 Jul 2013, 08:13 PM
  3. Cant find the complete ship to address
    By stagebrace in forum Bug Reports
    Replies: 5
    Last Post: 11 Mar 2011, 11:20 PM
  4. Setting-up USPS - problems with Ship From is Guam and Ship To is US
    By pamcc in forum Built-in Shipping and Payment Modules
    Replies: 2
    Last Post: 26 Mar 2010, 03:07 AM
  5. Replies: 0
    Last Post: 3 Apr 2009, 12:46 PM

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