Results 1 to 6 of 6

Hybrid View

  1. #1

    Default Need help making checkout comments required

    My site is www.igofresh.com. Linux hosting and ZC 1.3.9g.
    I am trying to make the comments field in checkout required before the customer can move on from step 1.
    In checkout_shipping.php?
    Many thanks in advance
    History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain

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

    Default Re: Need help making checkout comments required

    You could customize the file:
    /includes/modules/pages/checkout_payment/header_php.php
    Code:
    //  $_SESSION['comments'] = '';
    $comments = $_SESSION['comments'];
    if (trim($comments) == '') {
        $messageStack->add_session('checkout_shipping', 'Complete the comments', 'error');
        zen_redirect(zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
    }
    
    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!]
    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. #3

    Default Re: Need help making checkout comments required

    Thanks for the reply.
    That didn't work for me.
    I may have problems because I have changed the comments from a simple comment box in checkout_shipping.php to a drop down with 3 choices. I noticed in payment_shipping.php the comment box is populated with the "select one" message from the drop down. even if nothing is selected in the previous page's comment box.
    History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain

  4. #4

    Default Re: Need help making checkout comments required

    Now it works.
    I removed the text first option from the drop down so rather than saying '--chose an option--' it is just blank. This allows Ajeh's solution to work as intended.
    The only potential problem I foresee in that in step 2 of checkout the customer may decide to change their mind and type to edit the delivery option they chose in the previous step.
    Can the comment box or part or all of its contents be protected in page 2?

    Just for those who go down this post in the future,
    I added a drop down to replace the text input box in checkout comments. In my case, I needed to offer the customer 3 delivery time slots to choose from. I found that solution here:
    http://www.zen-cart.com/forum/showthread.php?t=107227
    The reason for using comments is that it loads onto the invoice and other order docs.
    The last piece of the puzzle was to make certain the customer selected a delivery option and did not skip this step.
    That is the solution posted here by Ajeh.
    All together it works like a charm.
    History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain

  5. #5

    Default Re: Need help making checkout comments required

    I have now added some virtual products and get a redirect loop error message rather than going to step 1 of checkout.
    Before implementing the comments field requirement as described above check out

    http://www.zen-cart.com/forum/showthread.php?t=73695

    I like this option better because it makes comments required by modifying checkout_confirmation/header_php.php not checkout_payment/header_php.php
    If you have only virtual product(s) in the cart checkout_payment/header_php.php will try to reload
    checkout_shipping which is skipped for virtual products!
    Theres the loop!
    History does not repeat itself but it [FONT="Century Gothic"][/FONT]does rhyme - Mark Twain

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

    Default Re: Need help making checkout comments required

    Thanks for the update on what worked for you on making comments required ...
    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!]
    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!

 

 

Similar Threads

  1. v153 Can I make "comments" a "required field" when making a purchase?
    By pixel1987 in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 7 Jan 2015, 08:17 PM
  2. Need to addition required field to checkout
    By dothanbydesign in forum General Questions
    Replies: 0
    Last Post: 25 May 2010, 04:07 PM
  3. Setting Order Comments field required, and making it drop-down?
    By davemehta in forum General Questions
    Replies: 8
    Last Post: 24 Nov 2008, 06:37 PM
  4. Replies: 3
    Last Post: 31 Aug 2007, 07:29 AM

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