Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34
  1. #11
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    Now I have found additonal files that are attached. They are english.php and header_php.php. If I make changes to these files as well will this accomplish what I am looking for? I can not locate any additional files at this time. But I will keep looking.

  2. #12
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    Went back and changed the wording for each of the conditions. No I do need to add a line between each one. And I made changes to english.php and header_php.php. It is still letting me go on without having those two boxes checked. Still searching though.

  3. #13
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    I meant Now I do need to add a line between each one. And I still can not figure out how to make it manditory that all the boxes must be checked.
    Last edited by A-1 Electronics; 21 Jul 2007 at 10:58 PM.

  4. #14
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding additonal confirmation box 2 chkout

    Looks like you have made some progress!!!!

    How about a url to this so we can see where you are and possibly view your generated source code
    Zen-Venom Get Bitten

  5. #15
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    Warning - This site contains adult content.

    If you would prefer, I could copy the source code for you. Otherwize, it is adultks.com.
    So I am down to needing the last two things: Making sure that the boxes are checked and moving each box to it's own line.

  6. #16
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Adding additonal confirmation box 2 chkout

    Without my stepping through each step of this i used the developers tool kit and searched for "NOT_ACCEPTED"

    the following is from source of one of my sites:
    Code:
    <fieldset>
    <legend><span class="termsconditions">Terms and Conditions</span></legend>
    <div><span class="termsdescription">Please acknowledge the terms and conditions bound to this order by ticking the following box. The terms and conditions can be read <a href="http://www.mysite.com/index.php?main_page=conditions"><span class="pseudolink">here</span></a>.</div>
    <input type="checkbox" name="conditions" value="1" id="conditions" /><label class="checkboxLabel" for="conditions"><span class="termsiagree">I have read and agreed to the terms and conditions bound to this order.</span></label>
    </fieldset>
    and the code for validation is in /includes/modules/pages/checkout_confirmation/header_php.php and is as follows:
    Code:
    if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
      if (!isset($_POST['conditions']) || ($_POST['conditions'] != '1')) {
        $messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');  }
    Now you need to replicate at least this for each of your new check boxes and of course change the if to the new box defines.
    The initial "if" refers to a condition set in the admin and this is another whole bag of code and if all other things are covered you might just omit these for your added boxes
    Code:
    if (DISPLAY_RETURNS_ON_CHECKOUT == 'true') { and
    if (DISPLAY_CCBILLING_ON_CHECKOUT == 'true') {
    I assumed that you have defined a class for each of the added boxes but your source does not indicate that you have and this should be in the tpl_ file for this and you can also add a clear both between statements there.
    This should get you closer
    Zen-Venom Get Bitten

  7. #17
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    New code for tpl_checkout_payment_default.php

    <?php
    if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    ?>
    <fieldset>
    <legend><?php echo TABLE_HEADING_CONDITIONS; ?></legend>
    <div><?php echo TEXT_CONDITIONS_DESCRIPTION;?></div>
    <div><?php echo zen_draw_checkbox_field('conditions', '1', false, 'id="conditions"');?>
    <label class="checkboxLabel" for="conditions"><?php echo TEXT_CONDITIONS_CONFIRM; ?></label>
    <div><?php echo zen_draw_checkbox_field('returns', '1', false, 'id="returns"');?>
    <label class="checkboxLabel" for="returns"><?php echo TEXT_RETURNS_CONFIRM; ?></label>
    <div><?php echo zen_draw_checkbox_field('ccbilling', '1', false, 'id="ccbilling"');?>
    <label class="checkboxLabel" for="conditions"><?php echo TEXT_CCBILLING_CONFIRM; ?></label>
    </fieldset>


    Well, I figured out the spacing. However, I am still unable to force the checkbox. I know you can make this selection in the admin panel to turn conditions on and off. I hope I don't need to make a change in the admin panel.

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

    Default Re: Adding additonal confirmation box 2 chkout

    If you peek in the:
    /includes/modules/pages/checkout_confirmation/header_php.php

    You will notice this test that addes to the message_stack:
    PHP Code:
    if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
      if (!isset(
    $_POST['conditions']) || ($_POST['conditions'] != '1')) {
        
    $messageStack->add_session('checkout_payment'ERROR_CONDITIONS_NOT_ACCEPTED'error');
      }

    Further along, you will notice this redirect when the message_stack is > 0:
    PHP Code:
    if ($messageStack->size('checkout_payment') > 0) {
      
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT'''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!

  9. #19
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    I do see that. But I don't understand. Maybe I have made an error.

    This is the code and the mod I made in header_php.php:

    if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
    if (!isset($_POST['conditions']) || ($_POST['conditions'] != '1')) {
    $messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
    }
    }
    if (DISPLAY_RETURNS_ON_CHECKOUT == 'true') {
    if (!isset($_POST['returns']) || ($_POST['returns'] != '1')) {
    $messageStack->add_session('checkout_payment', ERROR_RETURNS_NOT_ACCEPTED, 'error');
    }
    }
    if (DISPLAY_CCBILLING_ON_CHECKOUT =='true') {
    if (!isset($_POST['ccbilling']) || ($_POST['ccbilling'] != '1')) {
    $messageStack->add_session('checkout_payment', ERROR_CCBILLING_NOT_ACCEPTED, 'error');
    }
    }

    I know I am missing something very simple.

  10. #20
    Join Date
    Apr 2007
    Posts
    117
    Plugin Contributions
    1

    Default Re: Adding additonal confirmation box 2 chkout

    if ($messageStack->size('checkout_payment') > 0) {
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));


    Do I need to change > 0 to >2?


    Nope. That doesn't work.

    How about if I change the second and third instance of checkout_payment to checkout_payment_2 and checkout_payment_3.
    Last edited by A-1 Electronics; 22 Jul 2007 at 04:37 AM. Reason: Tried it. Didn't work.

 

 
Page 2 of 4 FirstFirst 1234 LastLast

Similar Threads

  1. Additonal Images Basenames
    By monkeyjr47906 in forum General Questions
    Replies: 2
    Last Post: 3 Feb 2011, 01:10 AM
  2. Additonal Image Uploader?
    By joyjoy in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 22 Oct 2010, 08:34 PM
  3. Create additonal category side box
    By mthem2003 in forum Basic Configuration
    Replies: 1
    Last Post: 5 Jun 2008, 12:57 AM
  4. Adding another box exactly like Categories box? Thanks for help!
    By marshall in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 8 Jun 2007, 09:41 PM
  5. Adding a link to right hand box and adding pages....Please help
    By Ivum in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Mar 2007, 11:45 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