Author Topic: Divide alternate shipping address list into column  (Read 854 times)

redonion1

  • Beginner
  • *
  • Posts: 7
Divide alternate shipping address list into column
« on: January 29, 2013, 06:32:49 am »
Hi - I have an old site that has a list of pre-programmed address' available to select by default for the shopper. The list has now evolved to over 50 delivery locations and the client wishes to divide the list into columns rather than one long list to avoid page scroll.

Please see screengrab for current layout.



Does anyone know how to alter the code below to make the request display in two - or ever three columns? Any assistance would be greatly appreciated.

list_shipto_addresses.tpl.php

Code: [Select]
<?php
if( !defined'_VALID_MOS' ) && !defined'_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' ); 
/**
*
* @version $Id: list_shipto_addresses.tpl.php 1725 2009-04-21 09:10:34Z soeren_nb $
* @package VirtueMart
* @subpackage templates
* @copyright Copyright (C) 2007-2009 Soeren Eberhardt. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/

?>

<table border="0" width="100%" cellpadding="2" cellspacing="0">
<tr class="sectiontableentry1">
<td>


</td>
  </tr>
 
<?php


$i 
2;
while(
$db->next_record()) {
echo '<tr class="sectiontableentry'.$i.'">'."\n";
echo '<td width="5%">'."\n";
$checked '';
if ( $value == $db->f("user_info_id")) {
$checked 'checked="checked" ';
}
echo '<input type="radio" name="'.$name.'" id="' $db->f("user_info_id") . '" value="' $db->f("user_info_id") . '" '.$checked.' />'." \n"

echo '</td>'."\n";
echo '<td>'."\n";
echo '<label for="'.$db->f("user_info_id") . '">';

echo '<strong>' $db->f("address_type_name") . "</strong> ";
//$url = SECUREURL . "index.php?page=account.shipto&user_info_id=" . $db->f('user_info_id')."&next_page=checkout.index";
//echo '(<a href="'.$sess->url($url).'">'.$VM_LANG->_('PHPSHOP_UDATE_ADDRESS').'</a>)'."\n";

// for state, can be used: state_name, state_2_code, state_3_code
// for country, can be used: country_name, country_2_code, country_3_code
// (not displayed in default template)
//echo $VM_LANG->_('PHPSHOP_CHECKOUT_CONF_PHONE').': '. $db->f("phone_1") . "\n";
//echo $VM_LANG->_('PHPSHOP_CHECKOUT_CONF_FAX').': '.$db->f("fax") . "\n";
echo '</label>
</td>
</tr>'
."\n";
if($i == 1$i++;
elseif($i == 2$i--;
}
?>

</table>

VirtueMart Forum

Divide alternate shipping address list into column
« on: January 29, 2013, 06:32:49 am »