Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. #11
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Drop down address book?

    Quote Originally Posted by mc12345678 View Post
    I managed to put address entries into a table by adding code to 'tpl_modules_checkout_address_book.php'
    Code:
    <table width="100%"><?php $tablecounter++;
    if (($tablecounter % 2) == 1) {
    ?><tr>
    <?php } 
    ?><td width="50%">......
    </td><?php 
    if (($tablecounter % 2) == 0) {
    ?></tr>
    <?php } 
            $addresses->MoveNext(); 
          } 
    ?>  </td></tr></table>
    But all 5 entries are squeezed in the same row.
    How to move 3rd&4th entries in the second row and 5th entry in the third row?
    Thank you.

    I changed the above code, but didn't provide "highlights". Please review for applicability.

    Also, before the loop that starts the while, set $tablecounter = 0;
    Also just realized that there may be some validation issues...
    The <table width...> should only be applied one time at the first time the table is displayed... All subsequent portions of the table should be built from row (<tr>) and column(<td>). So if the below code is fully within the while loop, then:

    Code:
    other php...
      if ($tablecounter == 0) { // If the tablecounter hasn't been incremented then initiate a new table one time while this code is within the while loop.
    ?>
    <table width="100%">
    <?php } // EOF if ($tablecounter == 0)
      $tablecounter++; // increments the table counter by 1
    
      if (($tablecounter % 2) == 1) { // If the counter modulus 2 (number of columns) is 1 (first cell in any series of columns) then initiate a new row
    ?><tr>
    <?php } 
    ?><td width="50%">...... (this section outputs the address data)
    </td><?php  // closes the cell in that row
    if (($tablecounter % 2) == 0) { // If the counter represents the end of the row by counter modulus 2 then close the row.
    ?></tr>
    <?php } 
            $addresses->MoveNext(); 
          } 
    if (($tablecounter % 2) == 1) { // If the above loop completed leaving an odd number of cells, then the row needs to be closed before closing the table.
    ?></tr>
    <?php } ?>
    </table>
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  2. #12
    Join Date
    Jun 2012
    Posts
    68
    Plugin Contributions
    2

    Default Re: Drop down address book?

    I cannot make it to make. Thanks anyway.

  3. #13
    Join Date
    Jul 2012
    Posts
    16,734
    Plugin Contributions
    17

    Default Re: Drop down address book?

    Quote Originally Posted by scott_ease View Post
    I cannot make it to make. Thanks anyway.
    Post what you have between [CODE] and [/CODE] tags. They canbe auto-created by pessing the # button on the menu of the message box.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 
Page 2 of 2 FirstFirst 12

Similar Threads

  1. v150 Email Address Exporter not show in my tools drop down menu
    By maperr55 in forum All Other Contributions/Addons
    Replies: 10
    Last Post: 1 May 2013, 03:01 PM
  2. Delivery Address from Drop Down List at Checkout
    By OrganicMan in forum General Questions
    Replies: 4
    Last Post: 25 Jul 2008, 10:02 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