Page 1 of 2 12 LastLast
Results 1 to 10 of 18
  1. #1
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Add Checkbox to Admin

    I would like to add a checkbox and text at the top to the new customer portion of my admin page like it shows in the attached picture.



    But what code do I use and where do I place it in the index.php?

    I have already have the appropiate field in my database for it.

    Jacque
    Last edited by jacque427; 19 Jun 2006 at 03:41 PM. Reason: Forgot something

    Just knowledgeable enough to be dangerous.

  2. #2
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Add Checkbox to Admin

    Without knowing what the action of these textboxes would be, in your admin/index.php file, it would be

    between those portions:


    <div class="reportBox">
    <div class="header"><?php echo BOX_ENTRY_NEW_CUSTOMERS; ?> </div>
    <?php $customers = $db->Execute("select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, a.customers_info_date_account_created as customers_info_date_account_created, a.customers_info_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_INFO . " a on c.customers_id = a.customers_info_id order by a.customers_info_date_account_created DESC limit 5");

    while (!$customers->EOF) {
    echo ' <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_CUSTOMERS, 'search=' . $customers->fields['customers_lastname'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink">'. $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a></span><span class="rigth">' . "\n";
    echo zen_date_short($customers->fields['customers_info_date_account_created']);
    echo ' </span></div>' . "\n";
    $customers->MoveNext();
    }
    ?>
    </div>

    Your textboxes portions would have to be set here.

    <div class="reportBox">
    <?php
    $counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " order by startdate DESC limit 10";
    $counter = $db->Execute($counter_query);
    ?>
    <div class="header"><?php echo sprintf(LAST_10_DAYS, $counter->RecordCount()); ?><?php echo '<span class="rigth"> &nbsp;&nbsp;&nbsp;' . SESSION . ' - ' . TOTAL . '</span>'; ?></div>
    <?php

    while (!$counter->EOF) {
    $counter_startdate = $counter->fields['startdate'];
    $counter_startdate_formatted = strftime(DATE_FORMAT_SHORT, mktime(0, 0, 0, substr($counter_startdate, 4, 2), substr($counter_startdate, -2), substr($counter_startdate, 0, 4)));
    echo ' <div class="row"><span class="left">' . $counter_startdate_formatted . '</span><span class="rigth"> ' . $counter->fields['session_counter'] . ' - ' . $counter->fields['counter'] . '</span> </div>' . "\n";
    $counter->MoveNext();
    }
    ?>

    </div>
    </div>
    Note: Read the bolded text from the quote above, This should give you a good idea where the textboxes should be added.

  3. #3
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Re: Add Checkbox to Admin

    Actually what I want is a checkbox or radio button. Something to show that the new customer is being talked to.

    Just knowledgeable enough to be dangerous.

  4. #4
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Add Checkbox to Admin


    Something to show that the new customer is being talked to.
    I seem to be missing the point of this objective. Could you elaborate that a little ?

  5. #5
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Re: Add Checkbox to Admin

    Sorry about that, this is what I have now...




    What I would like is a checkbox
    Code:
    <INPUT TYPE=CHECKBOX> Intake
    Next to the new customers name.

    The checkbox shows that the new customer intake is being processed so than two different people don't contact the customer.

    If it's not necessary, it doesn't have to interact with the database.

    Just knowledgeable enough to be dangerous.

  6. #6
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Add Checkbox to Admin


    The checkbox shows that the new customer intake is being processed so than two different people don't contact the customer.
    You know ... you do realize this is going to require more than a simple way of showing checkboxes / radio buttons in order to make this kind of processing ... right ?

  7. #7
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Re: Add Checkbox to Admin

    Oh yes.. :)

    A couple of thoughts that I have is that

    "<div id="coltwo">" in line 130 of index.php will have be changed to "colthree" because I want 3 columns.

    Then I'll have to add another line to the customers table in the database for the "intake". (this is easy)

    I'm a bit (or more like very) vague on the coding though. Things are getting fuzzy at that point.

    I'm not opposed to the work, just need pointed in the right direction.
    Last edited by jacque427; 19 Jun 2006 at 09:03 PM. Reason: Thought of something else

    Just knowledgeable enough to be dangerous.

  8. #8
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default and...

    I see in the checkout payment page that I could use zen_draw_radio_field

    Again, just looking for somthing simple to show that the customer is being processed.

    Just knowledgeable enough to be dangerous.

  9. #9
    Join Date
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: Add Checkbox to Admin


    just looking for somthing simple to show that the customer is being processed.
    Ah ! now I understand what you're looking for. You'd like to see the customer's auth account status from that table so that it would say something like: Customers status, and below, approved or not approved - right ?

    If so, fantastic idea. However, there's no need to checkbox or radio check anything. This could be detected instantly from our database. If no one else posts the codings before I do, I'd be willing to give my inputs on this one.

    Please advise.

  10. #10
    Join Date
    Apr 2005
    Location
    Spokane, Washington
    Posts
    372
    Plugin Contributions
    0

    Default Re: Add Checkbox to Admin

    Close!

    When a customer signs up we have to call them to get some more information.

    With a number of employees it can be difficult to know who has called a new customer.

    I'm just looking for a way to indicate that the customer is or has been contacted.

    A yes/no type of thing.

    And actually using your idea would work. I could just change name(s) to fit my needs.

    IE. Copy the appropriate table, re-name it (and the fields) to something along the lines of customer_contacted and so on from there.

    Love to do it and post *both* mods to the forum for other users to benefit from.

    Just knowledgeable enough to be dangerous.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. add checkbox to create account page
    By AmandaGero in forum General Questions
    Replies: 0
    Last Post: 26 Jul 2010, 11:26 PM
  2. Replies: 2
    Last Post: 9 Jan 2009, 12:33 PM
  3. I need to add TERMS checkbox
    By zzzoom in forum General Questions
    Replies: 5
    Last Post: 6 Mar 2008, 02:20 PM
  4. Trying to add a disclaimer checkbox and move "add to cart" button
    By RossMosh in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 1 Feb 2008, 11:45 PM
  5. add checkbox to checkout
    By dimar in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 27 Jan 2008, 02:17 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