Results 1 to 7 of 7
  1. #1

    About "Special Instructions or Comments About Your Order"

    Hi,

    I have question about "Special Instructions or Comments About Your Order"
    in both shipping and payment check out prcedure.

    Can I configure this box as complusory? (*) So customer must enter something in the box. It is because I have add another option for them so they must provide additional information in the box.

    Thanks,
    Tk

  2. #2

    Re: About "Special Instructions or Comments About Your Order"

    Can anyone help me to sovle this question, I can find any answer of it.
    Many thanks.

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

    Default Re: About "Special Instructions or Comments About Your Order"

    The best place for this is to start on Shipping so that the comments are done with, in theory, as the payment info will get tossed if the comments are missing there ...

    Edit the file:
    /includes/modules/pages/checkout_shipping/header_php.php

    Around lines 119 ... change the code to read:
    PHP Code:
    // process the selected shipping method
      
    if ( isset($_POST['action']) && ($_POST['action'] == 'process') ) {
        if (
    zen_not_null($_POST['comments'])) {
          
    $_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
        }
        
    $comments $_SESSION['comments'];
        if (empty(
    $comments)) {
          
    $messageStack->add_session('header'ERROR_MISSING_COMMENT'error');
          
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING'''SSL'));
        } 
    This forces the comment to be filled in or throw an error ...

    The error message: ERROR_MISSING_COMMENT

    Will need to be defined ... usually these extra things are best defined in a file in the directory:
    /includes/languages/english/extra_definitions/something.php

    These files auto load when english.php loads ...

    That test on the comments should then be added to the header_php.php for the checkout_payment as well so that they don't erase everything ...
    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!

  4. #4

    Default Re: About "Special Instructions or Comments About Your Order"

    wow~ this is very cool, it works!

    but i have a minor question is that the error message come at the top of webpage. How can i edit it to be shown on just on top of the comment box?

    thanks. really appreciated with your work and kindly help.
    Tk

  5. #5

    Default Re: About "Special Instructions or Comments About Your Order"

    I have checked that with the create_account. (because there are the error message i want to be shown in check_out_shipping)

    I found:
    <?php
    if ($messageStack->size('create_account') > 0) {
    ?>
    <tr>
    <td class="main" colspan="2"><?php echo $messageStack->output('create_account'); ?></td>
    </tr>

    I think this is the way to show error message if required field is missing.
    So how to integtate with the one I want for COMMENTS BOX WHEN CHECK OUT?

    anyone's help is much appreciated.

  6. #6

    Default Re: About "Special Instructions or Comments About Your Order"

    is there anyone can help me? i am confused...

  7. #7

    Re: About "Special Instructions or Comments About Your Order"

    seems i have to get back this problem and need a solution for it... >.<

    well, what i have changed is...

    includes/modules/pages/checkout_shipping/header_php.php, i create:

    if ($error == true) {
    $messageStack->add('checkout_shipping', ERRPR_MISSING_COMMENT);
    }

    and

    includes/templates/[custom]/templates/tpl_checkout_default.php, i create the error display at the place i wanted:

    <?php
    if ($messageStack->size('checkout_shipping') > 0) {
    echo $messageStack->output('checkout_shipping');
    }?>


    nothing happen.... anyone can help ?

    i did all these changes following the mechanism of the login / contact us / create account error....

    hopeless =(

 

 

Similar Threads

  1. Replies: 0
    Last Post: 26 Oct 2010, 10:51 PM
  2. Special Instructions or Comments About Your Order
    By scottb in forum General Questions
    Replies: 12
    Last Post: 10 Sep 2007, 12:08 PM
  3. Special Instructions or Comments About Your Order
    By vinnieb in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 15 Sep 2006, 05:01 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