Exemplo n.º 1
0
        ?>
</td>
              </tr>
<?php 
    }
    ?>

            </table></td>
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" valign="top"><b><?php 
    echo ENTRY_BILLING_ADDRESS;
    ?>
</b></td>
                <td class="main"><?php 
    echo oos_address_format($order->billing['format_id'], $order->billing, 1, '&nbsp;', '<br />');
    ?>
</td>
              </tr>
<?php 
    if (defined('GOOGLE_MAP_API_KEY')) {
        ?>
              <tr>
                <td class="main" valign="top"><b>Google Map</b></td>
                <td class="main"><?php 
        echo '<a href="javascript:popupGoogleMap(\'' . $aFilename['popup_google_map'] . '?query=' . rawurlencode($order->billing['city'] . ', ' . $order->billing['country']) . '\')">' . oos_image(OOS_IMAGES . 'icon_popup.gif', 'View Google Map');
        ?>
</a></td>
              </tr>
              <tr>
                <td colspan="2"><?php 
Exemplo n.º 2
0
    }
}
if ($process == '0') {
    $address_booktable = $oostable['address_book'];
    $sql = "SELECT COUNT(*) AS total\n            FROM {$address_booktable}\n            WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'\n              AND address_book_id != '" . intval($_SESSION['sendto']) . "'";
    $addresses_count_result = $dbconn->Execute($sql);
    $addresses_count = $addresses_count_result->fields['total'];
    if ($addresses_count > 0) {
        $radio_buttons = 0;
        $address_booktable = $oostable['address_book'];
        $sql = "SELECT address_book_id, entry_firstname AS firstname, entry_lastname AS lastname,\n                       entry_company AS company, entry_street_address AS street_address,\n                       entry_suburb AS suburb, entry_city AS city, entry_postcode AS postcode,\n                       entry_state AS state, entry_zone_id AS zone_id, entry_country_id AS country_id\n                FROM {$address_booktable}\n                WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'";
        $addresses_result = $dbconn->Execute($sql);
        $addresses_array = array();
        while ($addresses = $addresses_result->fields) {
            $format_id = oos_get_address_format_id($address['country_id']);
            $addresses_array[] = array('format_id' => $format_id, 'radio_buttons' => $radio_buttons, 'firstname' => $addresses['firstname'], 'lastname' => $addresses['lastname'], 'address_book_id' => $addresses['address_book_id'], 'address' => oos_address_format($format_id, $addresses, true, ' ', ', '));
            $radio_buttons++;
            // Move that ADOdb pointer!
            $addresses_result->MoveNext();
        }
    }
}
// if no shipping destination address was selected, use their own address as default
if (!isset($_SESSION['sendto'])) {
    $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
}
if (!isset($process)) {
    $process = '0';
}
// links breadcrumb
$oBreadcrumb->add($aLang['navbar_title_1'], oos_href_link($aModules['checkout'], $aFilename['checkout_shipping'], '', 'SSL'));
                       entry_company AS company, entry_street_address AS street_address,
                       entry_suburb AS suburb, entry_city AS city, entry_postcode AS postcode,
                       entry_state AS state, entry_zone_id AS zone_id, entry_country_id AS country_id
                FROM $address_booktable
                WHERE customers_id = '" . intval($_SESSION['customer_id']) . "'";
        $addresses_result = $dbconn->Execute($sql);
        $addresses_array = array();
        while ($addresses = $addresses_result->fields)
        {
            $format_id = oos_get_address_format_id($address['country_id']);
            $addresses_array[] = array('format_id' => $format_id,
                                       'radio_buttons' => $radio_buttons,
                                       'firstname' => $addresses['firstname'],
                                       'lastname' => $addresses['lastname'],
                                       'address_book_id' => $addresses['address_book_id'],
                                       'address' => oos_address_format($format_id, $addresses, true, ' ', ', '));
            $radio_buttons++;
            // Move that ADOdb pointer!
            $addresses_result->MoveNext();
        }

    }
}

// if no shipping destination address was selected, use their own address as default
if (!isset($_SESSION['sendto'])) {
    $_SESSION['sendto'] = $_SESSION['customer_default_address_id'];
}

if (!isset($process)) $process = '0';
Exemplo n.º 4
0
         <tr>
           <td><?php echo oos_draw_separator('trans.gif', '1', '5'); ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo $order->customer['telephone']; ?></td>
         </tr>
         <tr>
           <td class="main"><?php echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>'; ?></td>
         </tr>
       </table></td>
       <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
         <tr>
           <td class="main"><b><?php echo ENTRY_SHIP_TO; ?></b></td>
         </tr>
         <tr>
           <td class="main"><?php echo oos_address_format($order->delivery['format_id'], $order->delivery, 1, '&nbsp;', '<br />'); ?></td>
         </tr>
       </table></td>
     </tr>
   </table></td>
 </tr>
 <tr>
   <td><?php echo oos_draw_separator('trans.gif', '1', '10'); ?></td>
 </tr>
 <tr>
   <td><table border="0" cellspacing="0" cellpadding="2">
     <tr>
       <td class="main"><b><?php echo ENTRY_ORDER_NUMBER; ?></b></td>
       <td class="main"><?php echo intval($oID); ?></td>
     <tr>
     <tr>
Exemplo n.º 5
0
            <td class="main"><?php 
echo '<a href="mailto:' . $order->customer['email_address'] . '"><u>' . $order->customer['email_address'] . '</u></a>';
?>
</td>
          </tr>
        </table></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td class="main"><b><?php 
echo ENTRY_SHIP_TO;
?>
</b></td>
          </tr>
          <tr>
            <td class="main"><?php 
echo oos_address_format($order->delivery['format_id'], $order->delivery, 1, '&nbsp;', '<br />');
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php 
echo oos_draw_separator('trans.gif', '1', '10');
?>
</td>
  </tr>
  <tr>
    <td><table border="0" cellspacing="0" cellpadding="2">
Exemplo n.º 6
0
              <tr>
                <td class="main" valign="top"><b>Google Map</b></td>
                <td class="main"><?php echo '<a href="javascript:popupGoogleMap(\'' . $aFilename['popup_google_map'] . '?query=' . rawurlencode($order->delivery['city']. ', '.$order->delivery['country']) . '\')">' . oos_image(OOS_IMAGES . 'icon_popup.gif', 'View Google Map'); ?></a></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo oos_draw_separator('trans.gif', '1', '5'); ?></td>
              </tr>
<?php
      }
?>

            </table></td>
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" valign="top"><b><?php echo ENTRY_BILLING_ADDRESS; ?></b></td>
                <td class="main"><?php echo oos_address_format($order->billing['format_id'], $order->billing, 1, '&nbsp;', '<br />'); ?></td>
              </tr>
<?php
      if (defined('GOOGLE_MAP_API_KEY')) {
?>
              <tr>
                <td class="main" valign="top"><b>Google Map</b></td>
                <td class="main"><?php echo '<a href="javascript:popupGoogleMap(\'' . $aFilename['popup_google_map'] . '?query=' . rawurlencode($order->billing['city']. ', '.$order->billing['country']) . '\')">' . oos_image(OOS_IMAGES . 'icon_popup.gif', 'View Google Map'); ?></a></td>
              </tr>
              <tr>
                <td colspan="2"><?php echo oos_draw_separator('trans.gif', '1', '5'); ?></td>
              </tr>
<?php
      }
?>
            </table></td>
Exemplo n.º 7
0
 /**
  * Return a formatted address
  *
  * @param $customers_id
  * @param $address_id
  * @param $html
  * @param $boln
  * @param $eoln
  * @param $address
  * @param $html
  * @param $boln
  * @param $eoln
  */
  function oos_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {

    // Get database information
    $dbconn =& oosDBGetConn();
    $oostable =& oosDBGetTables();

    $address_booktable = $oostable['address_book'];
    $query = "SELECT entry_firstname AS firstname, entry_lastname AS lastname, entry_company AS company,
                     entry_street_address AS street_address, entry_suburb AS suburb, entry_city AS city,
                     entry_postcode AS postcode, entry_state AS state, entry_zone_id AS zone_id,
                     entry_country_id AS country_id
              FROM  $address_booktable
              WHERE  customers_id = '" . intval($customers_id) . "' AND
                     address_book_id = '" . intval($address_id) . "'";
    $address = $dbconn->GetRow($query);

    $format_id = oos_get_address_format_id($address['country_id']);

    return oos_address_format($format_id, $address, $html, $boln, $eoln);
  }