Ejemplo n.º 1
0
function print_address($x, $y, $nums)
{
    global $pdf, $num, $billing;
    $pos = $y;
    global $orders_query;
    global $order;
    global $orders;
    global $languages_id;
    global $_POST;
    if ($order) {
        if ($billing == true) {
            $addressparts = explode("\n", tep_address_format($order->billing['format_id'], $order->billing, 1, '', " \n"));
        } else {
            $addressparts = explode("\n", tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', " \n"));
        }
        foreach ($addressparts as $addresspart) {
            $fontsize = GENERAL_FONT_SIZE;
            while ($pdf->getTextWidth($fontsize, $addresspart) > LABEL_WIDTH) {
                $fontsize--;
            }
            //$addresspart = preg_replace("%,[[:space:]]*$%", "", $addresspart);
            $pdf->addText($x, $pos -= GENERAL_LINE_SPACING, $fontsize, $addresspart);
        }
        $pdf->addText($x + LABEL_WIDTH - ORDERIDXOFFSET - 22, $y + ORDERIDYOFFSET, ORDERIDFONTSIZE, $orders['orders_id']);
        if ($_POST['status'] && $_POST['status'] != $order->info['orders_status']) {
            $customer_notified = 0;
            $status = tep_db_prepare_input($_POST['status']);
            $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, BATCH_COMMENTS) . "\n\n";
            if ($_POST['notify']) {
                $status_query = tep_db_query("select orders_status_name as name from " . TABLE_ORDERS_STATUS . " where language_id = " . $languages_id . " and orders_status_id = " . tep_db_input($status));
                $status_name = tep_db_fetch_array($status_query);
                $email = STORE_NAME . "\n" . EMAIL_SEPARATOR . "\n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $orders['orders_id'] . "\n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($order->info['date_purchased']) . "\n\n" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $status_name['name']);
                tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
                $customer_notified = '1';
            }
            tep_db_query("update " . TABLE_ORDERS . " set orders_status = '" . tep_db_input($status) . "', last_modified = now() where orders_id = '" . $orders['orders_id'] . "'");
            tep_db_query("insert into " . TABLE_ORDERS_STATUS_HISTORY . " (orders_id, orders_status_id, date_added, customer_notified, comments) \r\n        values ('" . $orders['orders_id'] . "', '" . tep_db_input($status) . "', now(), '" . $customer_notified . "', '" . $notify_comments . "')");
        }
        if ($nums % NUM_LABELS_PER_PAGE == NUM_LABELS_PER_PAGE - 1) {
            $order = false;
            return false;
        } else {
            if ($orders = tep_db_fetch_array($orders_query)) {
                $order = new order($orders['orders_id']);
                return true;
            } else {
                $order = false;
                return false;
            }
        }
    } else {
        return false;
    }
}
Ejemplo n.º 2
0
<?php 
    if ($Qaddresses->valueInt('address_book_id') == $osC_Customer->default_address_id) {
        echo '&nbsp;<small><i>' . PRIMARY_ADDRESS . '</i></small>';
    }
    ?>

        </td>
        <td align="right"><?php 
    echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&edit', 'SSL') . '">' . tep_image_button('small_edit.gif', SMALL_IMAGE_BUTTON_EDIT) . '</a>&nbsp;<a href="' . tep_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&delete', 'SSL') . '">' . tep_image_button('small_delete.gif', SMALL_IMAGE_BUTTON_DELETE) . '</a>';
    ?>
</td>
      </tr>
      <tr>
        <td colspan="2" style="padding: 0px 0px 10px 10px;"><?php 
    echo tep_address_format($format_id, $Qaddresses->toArray(), true, ' ', '<br>');
    ?>
</td>
      </tr>

<?php 
}
?>

    </table>
  </div>
</div>

<div class="submitFormButtons">
  <span style="float: right;">
<?php 
Ejemplo n.º 3
0
            ?>
</td>
						  </tr>
						  <tr>
							<td width="10"><?php 
            echo tep_draw_separator('pixel_trans.gif', '10', '1');
            ?>
</td>
							<td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
							  <tr>
								<td width="10"><?php 
            echo tep_draw_separator('pixel_trans.gif', '10', '1');
            ?>
</td>
								<td class="main"><?php 
            echo tep_address_format($format_id, $addresses, true, ' ', ', ');
            ?>
</td>
								<td width="10"><?php 
            echo tep_draw_separator('pixel_trans.gif', '10', '1');
            ?>
</td>
							  </tr>
							</table></td>
							<td width="10"><?php 
            echo tep_draw_separator('pixel_trans.gif', '10', '1');
            ?>
</td>
						  </tr>
						</table></td>
						<td><?php 
        echo tep_draw_hidden_field('action', 'submit') . tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
        ?>
</div>
	</div> -->
	<fieldset>
	<legend><?php 
        echo TABLE_HEADING_ADDRESS_BOOK_ENTRIES;
        ?>
</legend>
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php 
        $radio_buttons = 0;
        $addresses_query = tep_db_query("select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ")");
        while ($addresses = tep_db_fetch_array($addresses_query)) {
            $format_id = tep_get_address_format_id($addresses['country_id']);
            echo '	  <tr valign="top">' . "\n" . '		<td>' . tep_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $sendto, 'style="margin-bottom: -2px;"') . tep_address_format($format_id, $addresses, true, ' ', ', ') . '</td>' . "\n" . '	  </tr>';
            $radio_buttons++;
        }
        ?>
	</table>
	</fieldset>
	<div class="buttons">
	  <div style="text-align: right;"><?php 
        echo tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE);
        ?>
</div>
	</div>
<?php 
    }
}
if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
Ejemplo n.º 5
0
function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
    if (is_array($address_id) && !empty($address_id)) {
        return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln);
    }
    $address_query = tep_db_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 " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customers_id . "' and address_book_id = '" . (int) $address_id . "'");
    $address = tep_db_fetch_array($address_query);
    $format_id = tep_get_address_format_id($address['country_id']);
    return tep_address_format($format_id, $address, $html, $boln, $eoln);
}
        while ($Qab->fetch()) {
            $format_id = tep_get_address_format_id($Qab->valueInt('country_id'));
            if ($Qab->valueInt('address_book_id') == $_SESSION['billto']) {
                echo '      <tr id="defaultSelected" class="moduleRowSelected">' . "\n";
            } else {
                echo '      <tr class="moduleRow">' . "\n";
            }
            ?>

        <td>
          <strong><?php 
            echo HTML::outputProtected($Qab->value('firstname') . ' ' . $Qab->value('lastname'));
            ?>
</strong>
          <div class="help-block"><?php 
            echo tep_address_format($format_id, $Qab->toArray(), true, ' ', ', ');
            ?>
</div>
        </td>
        <td align="right"><?php 
            echo HTML::radioField('address', $Qab->valueInt('address_book_id'), $Qab->valueInt('address_book_id') == $_SESSION['billto']);
            ?>
</td>
      </tr>

<?php 
        }
        ?>

      </tbody>
    </table>
Ejemplo n.º 7
0
 public function send_order_mail($order_id)
 {
     global $currencies;
     $html_products = '';
     $count = 0;
     $this->get_all_data_from_db($order_id);
     //Get all products
     foreach ($this->temp_data[$order_id]['orders_products'] as $orders_products_id => $products_data) {
         $count++;
         $products_ordered_attributes = '';
         //get attributes for product
         if (isset($this->temp_data[$order_id]['orders_products_attributes'][$orders_products_id])) {
             foreach ($this->temp_data[$order_id]['orders_products_attributes'][$orders_products_id] as $key => $value) {
                 $products_ordered_attributes .= "\n\t" . $this->temp_data[$order_id]['orders_products_attributes'][$orders_products_id][$key]['products_option'] . ' ' . $this->temp_data[$order_id]['orders_products_attributes'][$orders_products_id][$key]['products_options_values'];
             }
         }
         //oef get attributes
         $products_qty = $products_data['products_quantity'];
         $products_name = $products_data['products_name'] . '<span style="font-size:10px;display:block;">' . $products_ordered_attributes . '</span>';
         if (empty($products_data['products_model'])) {
             $products_model = Translate('geen referentie');
         } else {
             $products_model = $products_data['products_model'];
         }
         $products_price = $currencies->format($products_data['final_price'] * $products_data['products_quantity']);
         if ($count % 2) {
             $html_products .= '<tr class="odd">';
         } else {
             $html_products .= '<tr class="even">';
         }
         $html_products .= '<td class="boxmailgris">' . $products_name . '</td>';
         $html_products .= '<td class="boxmailgris">' . $products_model . '</td>';
         if (USE_PRICES_TO_QTY == 'true') {
             $html_products .= '<td class="boxmailgris">' . $order->products[$i]['maat'] . '</td>';
         }
         $html_products .= '<td class="boxmailgris">' . $products_data['products_quantity'] . '</td>';
         $html_products .= '<td class="boxmailgris" style="text-align:right;">' . $products_price . '</td></tr>';
     }
     //eof Get all products
     //Get order totals
     $order_total = 0;
     $Vartaxe = '';
     foreach ($this->temp_data[$order_id]['orders_total'] as $orders_total_id => $ot_data) {
         if ($ot_data['class'] == 'order_total') {
             $order_total = $ot_data['value'];
         }
         $Vartaxe .= $ot_data['title'] . ': ' . $ot_data['text'] . "<br />";
     }
     //eof Get order totals
     //Get payment method
     $Varmodpay = '';
     if (!empty($this->temp_data[$order_id]['orders']['payment_method'])) {
         $instance_id = end(explode('_', $this->temp_data[$order_id]['orders']['payment_method']));
         $strlen = strlen($this->temp_data[$order_id]['orders']['payment_method']) - (strlen($instance_id) + 1);
         $payment_method = substr($this->temp_data[$order_id]['orders']['payment_method'], 0, $strlen);
         global ${$payment_method};
         $Varmodpay .= ${$payment_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['title'];
         if (isset(${$payment_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description'])) {
             $constants = get_defined_constants();
             $description = '';
             $description_lines = explode("\n", stripslashes(${$payment_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description']));
             foreach ($description_lines as $line) {
                 if (preg_match_all('/(\\w*\\([^)]*\\))/', $line, $matches)) {
                     foreach ($matches[0] as $match) {
                         print eval('$Nmatch = ' . $match . ';');
                         $line = str_replace($match, $Nmatch, $line);
                     }
                 }
                 $line = str_replace(array_keys($constants), $constants, $line);
                 $description .= $line . '<br />';
             }
             $Varmodpay .= '<br />' . $description;
         }
     }
     //eof Get payment method
     //Get shipping method
     $Varmodeship = '';
     if (!empty($this->temp_data[$order_id]['orders']['shipping_method'])) {
         if (strstr($this->temp_data[$order_id]['orders']['shipping_method'], '_')) {
             $instance_id = end(explode('_', $this->temp_data[$order_id]['orders']['shipping_method']));
             $strlen = strlen($this->temp_data[$order_id]['orders']['shipping_method']) - (strlen($instance_id) + 1);
             $shipping_method = substr($this->temp_data[$order_id]['orders']['shipping_method'], 0, $strlen);
         } else {
             $shipping_method = $this->temp_data[$order_id]['orders']['shipping_method'];
         }
         global ${$shipping_method};
         $Varmodeship .= ${$shipping_method}->instances[$this->temp_data[$order_id]['orders']['shipping_method']]['title'];
         if (isset(${$shipping_method}->instances)) {
             if (isset(${$shipping_method}->instances[$this->temp_data[$order_id]['orders']['shipping_method']]['description'])) {
                 $constants = get_defined_constants();
                 $description = '';
                 $description_lines = explode("\n", stripslashes(${$shipping_method}->instances[$this->temp_data[$order_id]['orders']['shipping_method']]['description']));
                 foreach ($description_lines as $line) {
                     if (preg_match_all('/(\\w*\\([^)]*\\))/', $line, $matches)) {
                         foreach ($matches[0] as $match) {
                             print eval('$Nmatch = ' . $match . ';');
                             $line = str_replace($match, $Nmatch, $line);
                         }
                     }
                     $line = str_replace(array_keys($constants), $constants, $line);
                     $description .= $line;
                 }
                 $Varmodeship .= '<br />' . $description;
             }
         } else {
             //method title
             if (method_exists(${$shipping_method}, 'getTitle')) {
                 $Varmodeship .= '<br />' . Translate(${$shipping_method}->getTitle());
             } else {
                 $Varmodeship .= '<br />' . ${$shipping_method}->config['description'];
             }
         }
         if (isset(${$shipping_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description'])) {
             $constants = get_defined_constants();
             $description = '';
             $description_lines = explode("\n", stripslashes(${$payment_method}->instances[$this->temp_data[$order_id]['orders']['payment_method']]['description']));
             foreach ($description_lines as $line) {
                 if (preg_match_all('/(\\w*\\([^)]*\\))/', $line, $matches)) {
                     foreach ($matches[0] as $match) {
                         print eval('$Nmatch = ' . $match . ';');
                         $line = str_replace($match, $Nmatch, $line);
                     }
                 }
                 $line = str_replace(array_keys($constants), $constants, $line);
                 $description .= $line;
             }
             $Varmodpay .= '<br />' . $description;
         }
     }
     //eof Get shipping method
     //email vars
     $Varlogo = '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '"><img src="' . HTTP_SERVER . DIR_WS_CATALOG . DIR_WS_IMAGES . 'mail/logo.jpg" border="0" /></a> ';
     $Vartable1 = '<table width="100%"  border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">';
     $Vartable2 = '<table width="100%" border="0" cellpadding="3" cellspacing="3" bgcolor="#EFEFEF">';
     $varHiddenTest = Translate('Bestelnummer') . ': <STRONG> ' . $order_id . '</STRONG>' . "\n" . Translate('Besteldatum') . ': <strong>' . utf8_encode(strftime(DATE_FORMAT_LONG)) . '</strong>' . "\n" . Translate('Totaal') . ': ' . str_replace('&euro;', '€', $order_total) . "\n";
     $Vartext1 = '<b>' . Translate('Beste') . ' ' . $this->temp_data[$order_id]['orders']['customers_name'] . ' </b><br>' . Translate('Hartelijk dank voor uw bestelling bij ') . ' ' . STORE_NAME;
     $Vartext2 = '    ' . Translate('Bestelnummer') . ': <STRONG> ' . $order_id . '</STRONG><br>' . Translate('Besteldatum') . ': <strong>' . utf8_encode(strftime(DATE_FORMAT_LONG)) . '</strong><br><a href="' . HTTP_SERVER . DIR_WS_CATALOG . 'account_history_info.php?order_id=' . $order_id . '">' . Translate('Gedetailleerde pakbon') . ': ' . $order_id . '</a>';
     $Varmailfooter = Translate('Dit email adres is ingegeven op onze website door u of door een van onze bezoekers. Als u zich niet ingeschreven hebt op onze website contacteer ons dan via') . ' ' . STORE_OWNER_EMAIL_ADDRESS;
     $Varretour = '<b>' . Translate('De consument heeft het recht aan de onderneming mee te delen dat hij afziet van de aankoop, zonder betaling van een boete en zonder opgave van een motief binnen 14 kalenderdagen vanaf de dag die volgt op de levering van het goed.') . '</b>';
     $VarArticles = Translate('Item');
     $VarModele = Translate('Product nummer');
     $VarMaat = Translate('Maat');
     $VarQte = Translate('Aantal');
     $VarTotal = Translate('Totaal');
     $VarAddresship = Translate('Verzendadres');
     $VarAddressbill = Translate('Factuuradres');
     $Varmetodpaye = Translate('Betaalmethode');
     $Varmetodship = Translate('Verzendmethode');
     $Vardetail = '';
     $Varhttp = '<base href="' . HTTP_SERVER . DIR_WS_CATALOG . '">';
     $Varstyle = '<link rel="stylesheet" type="text/css" href="stylesheetmail.css">';
     $Varcomment = '';
     foreach ($this->temp_data[$order_id]['orders_status_history'] as $key => $data) {
         if ($data['comments']) {
             $Varcomment = '<tr><td colspan="2" class="boxmail">' . Translate('Opmerking') . '</td></tr>';
             $Varcomment .= '<tr><td colspan="2">' . $data['comments'] . '</td></tr>';
         }
     }
     //eof email vars
     //Get shipping address
     $Varshipaddress = '';
     $shipping_address = array();
     $shipping_address['firstname'] = $this->temp_data[$order_id]['orders']['delivery_name'];
     $shipping_address['email_address'] = $this->temp_data[$order_id]['orders']['customers_email_address'];
     $shipping_address['telephone'] = $this->temp_data[$order_id]['orders']['customers_telephone'];
     $shipping_address['street_address'] = $this->temp_data[$order_id]['orders']['delivery_street_address'];
     $shipping_address['suburb'] = $this->temp_data[$order_id]['orders']['delivery_suburb'];
     $shipping_address['city'] = $this->temp_data[$order_id]['orders']['delivery_city'];
     $shipping_address['state'] = $this->temp_data[$order_id]['orders']['delivery_state'];
     $shipping_address['country']['title'] = $this->temp_data[$order_id]['orders']['delivery_country'];
     $shipping_address['postcode'] = $this->temp_data[$order_id]['orders']['delivery_postcode'];
     $Varshipaddress = tep_address_format($this->temp_data[$order_id]['orders']['delivery_address_format_id'], $shipping_address, $html = false, $boln = '', $eoln = "\n");
     //eof Get shipping address
     //Get payment address
     $Varadpay = '';
     $payment_address = array();
     $payment_address['firstname'] = $this->temp_data[$order_id]['orders']['billing_name'];
     $payment_address['email_address'] = $this->temp_data[$order_id]['orders']['customers_email_address'];
     $payment_address['telephone'] = $this->temp_data[$order_id]['orders']['customers_telephone'];
     $payment_address['street_address'] = $this->temp_data[$order_id]['orders']['billing_street_address'];
     $payment_address['suburb'] = $this->temp_data[$order_id]['orders']['billing_suburb'];
     $payment_address['city'] = $this->temp_data[$order_id]['orders']['billing_city'];
     $payment_address['state'] = $this->temp_data[$order_id]['orders']['billing_state'];
     $payment_address['country']['title'] = $this->temp_data[$order_id]['orders']['billing_country'];
     $payment_address['postcode'] = $this->temp_data[$order_id]['orders']['billing_postcode'];
     $Varadpay = tep_address_format($this->temp_data[$order_id]['orders']['billing_address_format_id'], $payment_address, $html = false, $boln = '', $eoln = "\n");
     //eof Get payment address
     //load email template
     $cwd = getcwd();
     chdir($_SERVER['DOCUMENT_ROOT'] . DIR_WS_HTTP_CATALOG);
     require DIR_WS_MODULES . 'email/html_checkout_process.php';
     $email_order = $html_email_order;
     chdir($cwd);
     //send email
     if (tep_mail($this->temp_data[$order_id]['orders']['customers_name'], $this->temp_data[$order_id]['orders']['customers_email_address'], Translate('Verwerking bestelling'), $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS)) {
         tep_db_query('UPDATE orders_status_history SET customer_notified = 1 WHERE orders_id = "' . $order_id . '"');
     }
     //send extra emails
     if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
         tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, Translate('Verwerking bestelling'), $email_order, STORE_NAME, STORE_OWNER_EMAIL_ADDRESS);
     }
 }
Ejemplo n.º 8
0
    }
    if (isset($order->products[$i]['attributes']) && sizeof($order->products[$i]['attributes']) > 0) {
        $attr[$i] = $order->products[$i]['attributes'];
        for ($j = 0, $n2 = sizeof($order->products[$i]['attributes']); $j < $n2; $j++) {
            $xoopsTpl->assign("attribs", 1);
        }
    }
    $taxgroups = $order->info['tax_groups'];
    if (sizeof($order->info['tax_groups']) > 1) {
        $products[$i]['stax'] = 1;
        $products[$i]['taxd'] = tep_display_tax_value($order->products[$i]['tax']);
    }
    $products[$i]['final_price'] = $currencies->display_price($order->products[$i]['final_price'], $order->products[$i]['tax'], $order->products[$i]['qty']);
}
$xoopsTpl->assign("fcpa_link", tep_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL'));
$xoopsTpl->assign("bad", tep_address_format($order->billing['format_id'], $order->billing, 1, ' ', '<br>'));
$xoopsTpl->assign("fcp_link", tep_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
$xoopsTpl->assign("cos_link", tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$xoopsTpl->assign("omt", $order->info['payment_method']);
if (MODULE_ORDER_TOTAL_INSTALLED) {
    $xoopsTpl->assign("mot", 1);
    $order_total_modules->process();
    $xoopsTpl->assign("motc", $order_total_modules->output());
}
if (is_array($payment_modules->modules)) {
    if ($confirmation = $payment_modules->confirmation()) {
        $xoopsTpl->assign("pmods", 1);
        $conffields = $confirmation['fields'];
        for ($i = 0, $n = sizeof($confirmation['fields']); $i < $n; $i++) {
            $r = $i;
        }
Ejemplo n.º 9
0
        <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
          <tr>
            <td colspan="2"><?php 
    echo tep_draw_separator();
    ?>
</td>
          </tr>
          <tr>
            <td valign="top"><table border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td class="main" valign="top"><b><?php 
    echo TEXT_AFFILIATE;
    ?>
</b></td>
                <td class="main"><?php 
    echo tep_address_format($payments['affiliate_address_format_id'], $affiliate_address, 1, '&nbsp;', '<br>');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
              </tr>
Ejemplo n.º 10
0
function tep_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n")
{
    $OSCOM_Db = Registry::get('Db');
    if (is_array($address_id) && !empty($address_id)) {
        return tep_address_format($address_id['address_format_id'], $address_id, $html, $boln, $eoln);
    }
    $Qaddress = $OSCOM_Db->prepare('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 :table_address_book where address_book_id = :address_book_id and customers_id = :customers_id');
    $Qaddress->bindInt(':address_book_id', $address_id);
    $Qaddress->bindInt(':customers_id', $customers_id);
    $Qaddress->execute();
    $format_id = tep_get_address_format_id($Qaddress->valueInt('country_id'));
    return tep_address_format($format_id, $Qaddress->toArray(), $html, $boln, $eoln);
}
Ejemplo n.º 11
0
 function quote($method = '')
 {
     global $order, $customer_id;
     $method = (int) $method;
     $zones_check_query = tep_db_query("select count(*) as total from " . TABLE_ZONES . " where zone_country_id = '" . (int) $order->delivery['country_id'] . "'");
     $zones_check = tep_db_fetch_array($zones_check_query);
     $specify_zone = $zones_check['total'] > 0 ? true : false;
     $common_qty = 0;
     $periodicals_qty = 0;
     $total_sum = 0;
     if (is_object($order)) {
         reset($order->products);
         while (list(, $order_product) = each($order->products)) {
             if ($order_product['periodicity'] > 0) {
                 $periodicals_qty += $order_product['qty'];
             } else {
                 $common_qty += $order_product['qty'];
                 $total_sum += $order_product['final_price'] * $order_product['qty'];
             }
         }
     }
     $points = array();
     $zone_id = $order->delivery['zone_id'];
     $self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : ""));
     $self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
     if ($self_delivery_check['total'] < 1) {
         $parent_cities = array($order->delivery['postcode']);
         tep_get_parents($parent_cities, $order->delivery['postcode'], TABLE_CITIES);
         $parent_cities = array_reverse($parent_cities);
         $parent_city_info_query = tep_db_query("select zone_id from " . TABLE_CITIES . " where city_country_id = '" . (int) $order->delivery['country_id'] . "' and city_id = '" . tep_db_input($parent_cities[0]) . "'");
         $parent_city_info = tep_db_fetch_array($parent_city_info_query);
         $zone_id = $parent_city_info['zone_id'];
         $self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : ""));
         $self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
         if ($self_delivery_check['total'] < 1) {
             $self_delivery_check_query = tep_db_query("select min(entry_zone_id-" . (int) $zone_id . ") as min_zone_id from " . TABLE_SELF_DELIVERY . " where entry_country_id = '" . (int) $order->delivery['country_id'] . "' order by min_zone_id limit 1");
             $self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
             $zone_id = $self_delivery_check['min_zone_id'] + $zone_id;
         }
     }
     $self_delivery_check_query = tep_db_query("select count(*) as total from " . TABLE_SELF_DELIVERY . " where" . ($method > 0 ? " self_delivery_id = '" . (int) $method . "'" : " entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : "")));
     $self_delivery_check = tep_db_fetch_array($self_delivery_check_query);
     $self_delivery_query = tep_db_query("select self_delivery_id, self_delivery_cost, self_delivery_free, entry_country_id, entry_zone_id, entry_suburb as suburb, entry_city as city, entry_street_address as street_address, entry_telephone as telephone, self_delivery_description from " . TABLE_SELF_DELIVERY . " where self_delivery_status = '1'" . ($method > 0 ? " and self_delivery_id = '" . (int) $method . "'" : ($this->is_periodical ? "" : " and (self_delivery_only_periodicals = '0' or self_delivery_only_periodicals is null)") . " and entry_country_id = '" . (int) $order->delivery['country_id'] . "'" . ($specify_zone ? " and entry_zone_id = '" . (int) $zone_id . "'" : "") . " order by city, street_address") . "");
     while ($self_delivery = tep_db_fetch_array($self_delivery_query)) {
         $shipping_cost = 0;
         $self_delivery['self_delivery_cost'] = str_replace(',', '.', $self_delivery['self_delivery_cost'] / $order->info['currency_value']);
         $self_delivery['self_delivery_free'] = str_replace(',', '.', $self_delivery['self_delivery_free'] / $order->info['currency_value']);
         if ($self_delivery['self_delivery_cost'] > 0) {
             if ($common_qty > 0) {
                 if ($self_delivery['self_delivery_free'] > 0 && $total_sum > $self_delivery['self_delivery_free']) {
                     $shipping_cost = 0;
                 } else {
                     $shipping_cost = $self_delivery['self_delivery_cost'];
                 }
             }
             if ($periodicals_qty > 0) {
                 $shipping_cost += $periodicals_qty * $self_delivery['self_delivery_cost'];
             }
         } else {
             $shipping_cost = 0;
         }
         $region_info_query = tep_db_query("select zone_name as state from " . TABLE_ZONES . " where zone_id = '" . (int) $self_delivery['entry_zone_id'] . "' and zone_country_id = '" . (int) $self_delivery['entry_country_id'] . "'");
         if (tep_db_num_rows($region_info_query) > 0) {
             $region_info = tep_db_fetch_array($region_info_query);
             $self_delivery = array_merge($self_delivery, $region_info);
         }
         $points[] = array('id' => $self_delivery['self_delivery_id'], 'title' => tep_address_format($order->delivery['format_id'], $self_delivery, 1, '', ', '), 'cost' => $shipping_cost);
     }
     if (sizeof($points) == 0 && $self_delivery_check['total'] == 0) {
         //		$points[] = array('id' => $this->code,
         //						  'title' => MODULE_SHIPPING_SELF_TEXT_WAY,
         //						  'cost' => $shipping_cost);
     }
     if (sizeof($points) > 0) {
         $this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SELF_TEXT_TITLE, 'methods' => $points);
     }
     return $this->quotes;
 }
Ejemplo n.º 12
0
 $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
 // set up delivery address array
 $address_array = explode('<br>', tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>'));
 if (SHIP_FROM_COUNTRY == $address_array[count($address_array) - 1]) {
     $address_array[count($address_array) - 1] = '';
 }
 $delivery_address_array = array();
 $i = 0;
 foreach ($address_array as $key => $value) {
     if (!is_null($value) && $value !== "") {
         $delivery_address_array[$i] = $value;
         $i++;
     }
 }
 // set up billing address array
 $address_array = explode('<br>', tep_address_format($order->billing['format_id'], $order->billing, 1, '', '<br>'));
 $lines = count($address_array) - 1;
 if (SHIP_FROM_COUNTRY == $address_array[$lines]) {
     $address_array[$lines] = '';
 }
 $billing_address_array = array();
 $i = 0;
 foreach ($address_array as $key => $value) {
     if (!is_null($value) && $value !== "") {
         $billing_address_array[$i] = $value;
         $i++;
     }
 }
 $address_array = explode('<br>', str_replace("\r\n", "<br>", STORE_NAME_ADDRESS));
 $i = 0;
 //The first $key number is the number of lines in your store name and address excluding the telephone number at the bottom.
Ejemplo n.º 13
0
            <td class="main"><?php 
echo '<a href="mailto:' . $osC_Order->getCustomer('email_address') . '"><u>' . $osC_Order->getCustomer('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 tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>');
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php 
echo tep_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
  </tr>
  <tr>
    <td><table border="0" cellspacing="0" cellpadding="2">
Ejemplo n.º 14
0
</legend>
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
<?php 
$counter = 0;
$addresses_query = tep_db_query("(select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $customer_default_address_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ")) union (select address_book_id, entry_firstname as firstname, entry_lastname as lastname, 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, entry_telephone as telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id <> '" . (int) $customer_default_address_id . "' and entry_country_id in (select countries_id from " . TABLE_COUNTRIES . ") order by firstname, lastname) order by '" . (int) $customer_default_address_id . "'");
while ($addresses = tep_db_fetch_array($addresses_query)) {
    $format_id = tep_get_address_format_id($addresses['country_id']);
    $counter++;
    $is_primary = false;
    if ($addresses['address_book_id'] == $customer_default_address_id) {
        $is_primary = true;
    }
    ?>
	  <tr valign="top">
		<td><?php 
    echo $counter . '. ' . ($is_primary ? '<strong>' : '') . tep_address_format($format_id, $addresses, true, ' ', ', ') . ($is_primary ? '</strong>&nbsp;<small>' . PRIMARY_ADDRESS . '</small>' : '');
    ?>
</td>
		<td width="150" align="right"><?php 
    echo '<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_EDIT . '</a>&nbsp;&nbsp;<a href="' . tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $addresses['address_book_id'], 'SSL') . '">' . SMALL_IMAGE_BUTTON_DELETE . '</a>';
    ?>
</td>
	  </tr>
<?php 
}
?>
	</table>
	</fieldset>
	<div class="buttons">
	  <div style="float: left;"><?php 
echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' . tep_image_button('button_back.gif', IMAGE_BUTTON_BACK, 'class="button_back"') . '</a>';
        $radio_buttons = 0;
        $i = 0;
        $addresses_query = tep_db_query("select address_book_id, 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 " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "'");
        while ($addresses = tep_db_fetch_array($addresses_query)) {
            $adr[$i] = $addresses;
            $adr[$i]['radio'] = $radio_buttons;
            $format_id = tep_get_address_format_id($addresses['country_id']);
            if ($addresses['address_book_id'] == $sendto) {
                $adr[$i]['sendto'] == 1;
                echo '                  <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
            } else {
                echo '                  <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
            }
            $adr[$i]['firstname'] = tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
            $adr[$i]['addressradio'] = tep_draw_radio_field('address', $addresses['address_book_id'], $addresses['address_book_id'] == $sendto);
            $adr[$i]['address'] = tep_address_format($format_id, $addresses, true, ' ', ', ');
            $radio_buttons++;
            $i++;
        }
        $xoopsTpl->assign("adr", $adr);
    }
}
if ($addresses_count < MAX_ADDRESS_BOOK_ENTRIES) {
    $xoopsTpl->assign("maxadr", 1);
    require DIR_WS_MODULES . 'checkout_new_address.php';
}
$xoopsTpl->assign("action", tep_draw_hidden_field('action', 'submit'));
$xoopsTpl->assign("bt_continue", tep_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE));
if ($process == true) {
    $xoopsTpl->assign("process", 1);
    $xoopsTpl->assign("csa_link", tep_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL'));
Ejemplo n.º 16
0
                <td class="main"><?php 
    echo tep_not_null($order->delivery['time']) ? $order->delivery['time'] : TEXT_NOT_SET;
    ?>
</td>
              </tr>
            </table></td>
            <td><table width="100%" border="0" cellspacing="0" cellpadding="2">
              <tr valign="top">
                <td class="main" width="100"><strong><?php 
    echo ENTRY_BILLING_ADDRESS;
    ?>
</strong></td>
                <td class="main"><?php 
    $order_billing_array = $order->billing;
    unset($order_billing_array['telephone']);
    echo $order->billing['name'] . ', ' . tep_address_format($order->billing['format_id'], $order_billing_array, 1, '', '<br>');
    ?>
</td>
              </tr>
              <tr>
                <td colspan="2"><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '5');
    ?>
</td>
              </tr>
              <tr>
				<td class="main"><strong><?php 
    echo ENTRY_TELEPHONE_NUMBER;
    ?>
</strong></td>
                <td class="main"><?php 
Ejemplo n.º 17
0
		<td><?php 
        echo TEXT_ORDER_PRODUCTS;
        ?>
</td>
		<td><?php 
        echo $products['count'] . ' (' . strip_tags($history['order_total']) . ')';
        ?>
</td>
	  </tr>
	  <tr valign="top">
		<td><?php 
        echo $order_type;
        ?>
</td>
		<td><?php 
        echo tep_output_string_protected(tep_address_format($history['address_format_id'], $history, 1, ' ', ' '));
        ?>
</td>
	  </tr>
<?php 
        if (sizeof($tracking_numbers) > 0) {
            ?>
	  <tr valign="top">
		<td><?php 
            echo TEXT_TRACKING_NUMBER;
            ?>
</td>
		<td><?php 
            echo implode('<br />', $tracking_numbers);
            ?>
</td>
Ejemplo n.º 18
0
 function asdpostpay()
 {
     global $order, $customer_id;
     $this->code = 'asdpostpay';
     $this->title = MODULE_SHIPPING_ASDPOSTPAY_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_ASDPOSTPAY_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_ASDPOSTPAY_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = 0;
     $this->enabled = MODULE_SHIPPING_ASDPOSTPAY_STATUS == 'True' ? true : false;
     $this->courier_enabled = false;
     $this->pickup_enabled = false;
     $this->pickup = '';
     if ($order->content_type == 'virtual') {
         $this->enabled = false;
     }
     if ($this->enabled) {
         if (is_object($order)) {
             reset($order->products);
             while (list(, $order_product) = each($order->products)) {
                 if ($order_product['periodicity'] > 0) {
                     $this->enabled = false;
                     break;
                 }
             }
         }
     }
     if ($customer_id == 25627 || $customer_id == 2) {
         $this->enabled = true;
     }
     if ($this->enabled) {
         if ((int) MODULE_SHIPPING_ASDPOSTPAY_COURIER_ZONE > 0) {
             $geozones_check_query = tep_db_query("select count(*) as total from " . TABLE_CITIES_TO_GEO_ZONES . " where geo_zone_id = '" . (int) MODULE_SHIPPING_ASDPOSTPAY_COURIER_ZONE . "' and city_id = '" . tep_db_input($order->delivery['postcode']) . "'");
             $geozones_check = tep_db_fetch_array($geozones_check_query);
             if ($geozones_check['total'] > 0) {
                 $this->courier_enabled = true;
             }
         }
         if ((int) MODULE_SHIPPING_ASDPOSTPAY_PICKUP_ZONE > 0) {
             $geozones_check_query = tep_db_query("select count(*) as total from " . TABLE_CITIES_TO_GEO_ZONES . " where geo_zone_id = '" . (int) MODULE_SHIPPING_ASDPOSTPAY_PICKUP_ZONE . "' and city_id = '" . tep_db_input($order->delivery['postcode']) . "'");
             $geozones_check = tep_db_fetch_array($geozones_check_query);
             if ($geozones_check['total'] > 0) {
                 $this->pickup_enabled = true;
                 // ищем пункт самовывоза
                 $filename = MODULE_SHIPPING_ASDPOSTPAY_TABLE_FILE_NAME;
                 if (file_exists($filename)) {
                     $fp = fopen($filename, 'r');
                     while (list($city, $state, $street_address, $postcode, $telephone) = fgetcsv($fp, 128, ';')) {
                         if (tep_not_null($postcode)) {
                             while (strlen($postcode) < 5) {
                                 $postcode = '0' . $postcode;
                             }
                             $postcode = substr($postcode, 0, 3);
                             if (preg_match('/^' . $postcode . '.*$/', $order->delivery['postcode'])) {
                                 $telephone = trim($telephone);
                                 if (tep_not_null($telephone)) {
                                     $telephone = MODULE_SHIPPING_ASDPOSTPAY_TEXT_TELEPHONE . $telephone;
                                 }
                                 $this->pickup = tep_address_format(1, array('city' => trim($city), 'state' => trim($state), 'street_address' => trim($street_address), 'telephone' => $telephone), true, '', "\n");
                                 break;
                             }
                         }
                     }
                     fclose($fp);
                 }
             }
             if ($this->pickup == '') {
                 $this->pickup_enabled = false;
             }
         }
     }
     if (!$this->courier_enabled && !$this->pickup_enabled) {
         $this->enabled = false;
     }
 }
Ejemplo n.º 19
0
</div>
        <div class="infoBoxContent">
          <p><?php 
    echo tep_address_format($osC_Order->getDelivery('format_id'), $osC_Order->getDelivery(), 1, '', '<br>');
    ?>
</p>
        </div>
      </td>
      <td width="33%" valign="top">
        <div class="infoBoxHeading"><?php 
    echo tep_image('templates/' . $template . '/images/icons/16x16/bill.png', ENTRY_BILLING_ADDRESS, '16', '16') . ' ' . ENTRY_BILLING_ADDRESS;
    ?>
</div>
        <div class="infoBoxContent">
          <p><?php 
    echo tep_address_format($osC_Order->getBilling('format_id'), $osC_Order->getBilling(), 1, '', '<br>');
    ?>
</p>
        </div>
      </td>
    </tr>
  </table>

  <br>

  <table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBoxContent">
    <tr>
      <td width="33%" valign="top">
        <div class="infoBoxHeading"><?php 
    echo tep_image('templates/' . $template . '/images/icons/16x16/payment.png', ENTRY_PAYMENT_METHOD, '16', '16') . ' ' . ENTRY_PAYMENT_METHOD;
    ?>
Ejemplo n.º 20
0
$pdf = new PDF();
$pdf->AliasNbPages();
// Abstände auf der seite setzen
$pdf->SetMargins(4, 2, 4);
// Hinzufügen der 1. Seite
$pdf->AddPage();
// Adressfeld mit Absender und Rechnungsanschrift
$pdf->SetX(0);
$pdf->SetY(58);
$pdf->SetFont('Arial', '', 6);
$pdf->SetTextColor(0);
$pdf->Text(20, 50, SHOPBETREIBER . ' *' . SHOPSTRASSE . ' *' . SHOPSTADT);
$pdf->SetFont('Arial', '', 9);
$pdf->SetTextColor(0);
$pdf->Cell(20);
$pdf->MultiCell(70, 3.3, tep_address_format($order->billing['format_id'], $order->billing, '', '', "\n"), 0, 'L');
// Lieferanschrift
/*
    $pdf->SetFont('Arial','B',8);
$pdf->SetTextColor(0);
$pdf->Text(117,71,ENTRY_SHIP_TO);
$pdf->SetX(0);
$pdf->SetY(74);
    $pdf->Cell(115);
*/
// Barcode
/* if (BARCODE_RECHNUNG == 'ja'){
 $print_barcode = pdf_open_jpeg($pdf, 'barcodegen.php?barcode= ' . tep_db_input($oID) .);
 $pdf->Image($print_barcode,120,74,60);
}
$bar = barcodegen.php?barcode=
Ejemplo n.º 21
0
 $ship_info['dhlairborne'] = array('name' => 'DHL', 'track_url' => 'http://www.dhl-usa.com/TrackByNbr.asp', 'track_name' => 'Tracking Number');
 $ship_info['dhl'] = $ship_info['dhlairborne'];
 $ship_method = preg_replace('/_.*/', '', $order->info['shipping_method']);
 if (!isset($ship_info[$ship_method])) {
     $ship_method = MODULE_SHIPPING_AIRBORNE_STATUS == 'True' ? 'dhl' : (MODULE_SHIPPING_USPS_STATUS == 'True' ? 'usps' : 'ups');
 }
 $tpl = array();
 $tpl['config'] = array(store_name => STORE_NAME, store_owner_email_address => STORE_OWNER_EMAIL_ADDRESS, http_server => HTTP_CATALOG_SERVER);
 $tpl['link'] = array(account_history => tep_catalog_href_link('account_history_info.php', 'order_id=' . $oID, 'SSL', false), account => tep_catalog_href_link('account.php'), tell_a_friend => tep_catalog_href_link('tell_a_friend.php'));
 $tpl['order_id'] = $oID;
 $tpl['info'] = $order->info;
 $tpl['customer'] = $order->customer;
 $tpl['customer']['password'] = '******';
 list($tpl['customer']['firstname'], $tpl['customer']['lastname']) = explode(' ', $tpl['customer']['name']);
 $tpl['date'] = strftime(DATE_FORMAT_LONG);
 $tpl['address'] = array(shipping => array(text => tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n"), html => tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', "\n")), billing => array(text => tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n"), html => tep_address_format($order->billing['format_id'], $order->billing, 1, '', "\n")));
 $tpl['products_ordered'] = array('text' => $products_ordered, 'html' => $products_ordered_html);
 $tpl['payment'] = array(title => $order->info['payment_method'], subtotal => '$' . number_format($order->info['subtotal'], 2), total => '$' . number_format($order->info['total'], 2), order_total_label => array(text => join("\n", $ot_label_text), html => "<table width=100%>\n" . join("\n", $ot_label_html) . "</table>"), cc_type => isset($order->info['cc_type']) ? $order->info['cc_type'] : '', cc_number => isset($order->info['cc_number']) ? str_repeat('*', max(strlen($order->info['cc_number']) - 4, 0)) . substr($order->info['cc_number'], -4, 4) : '');
 $tpl['ship_info'] = $ship_info[$ship_method];
 $tpl['ship_info']['service_eta'] = 3;
 $tpl['ship_info']['method'] = preg_replace('/^.*?_/', '', $order->info['shipping_method']);
 $tpl['comments'] = !empty($order->info['comments']) ? $order->info['comments'] : '';
 if (!empty($tpl['order_id'])) {
     require_once DIR_WS_FUNCTIONS . 'email_now.php';
     $extra_emails = SEND_EXTRA_ORDER_EMAILS_TO != '' ? explode(',', SEND_EXTRA_ORDER_EMAILS_TO) : NULL;
     email_now('checkout_confirm', $tpl, $extra_emails);
 } else {
     tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, 'Order email attempted with no order data from IP ' . $_SERVER['REMOTE_ADDR'], STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
 }
 $messageStack->add_session('An email order confirmation has been sent.', 'success');
 $messageStack->add('An email order confirmation has been sent.', 'success');
Ejemplo n.º 22
0
 function getAddressFormatted($type)
 {
     global $order;
     switch ($type) {
         case 'sendto':
             $address = $order->delivery;
             break;
         case 'billto':
             $address = $order->billing;
             $address['email_address'] = $order->customer['email_address'];
             $address['telephone'] = $order->customer['telephone'];
             $address['format_id'] = '6';
             break;
     }
     return tep_address_format($address['format_id'], $address, false, '', "\n");
 }
Ejemplo n.º 23
0
    ?>
</b></td>
                                                        <td class="main"><?php 
    echo tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>');
    ?>
</td>
                                                    </tr>
                                                </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 tep_address_format($order->billing['format_id'], $order->billing, 1, '', '<br>');
    ?>
</td>
                                                    </tr>
                                                </table></td>
                                        </tr>
                                    </table></td>
                            </tr>
                            <tr>
                                <td><?php 
    echo tep_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
                            </tr>
                            <tr>
                                <td><table border="0" cellspacing="0" cellpadding="2">
Ejemplo n.º 24
0
    $xoopsTpl->assign("messagetext", $messageStack->output('addressbook'));
}
$xoopsTpl->assign("arrow_se", tep_image(DIR_WS_IMAGES . 'arrow_south_east.gif'));
$xoopsTpl->assign("adr_label", tep_address_label($customer_id, $customer_default_address_id, true, ' ', '<br>'));
$addresses_query = tep_db_query("select address_book_id, 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 " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' order by firstname, lastname");
$i = 0;
$xoopsTpl->assign("img_small", tep_image_button('small_edit.gif', SMALL_IMAGE_BUTTON_EDIT));
$xoopsTpl->assign("img_small_del", tep_image_button('small_delete.gif', SMALL_IMAGE_BUTTON_DELETE));
while ($addresses = tep_db_fetch_array($addresses_query)) {
    $address[$i] = $addresses;
    $format_id = tep_get_address_format_id($addresses['country_id']);
    $address[$i]['link'] = tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'edit=' . $addresses['address_book_id'], 'SSL');
    $address[$i]['link_delete'] = tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, 'delete=' . $addresses['address_book_id'], 'SSL');
    if ($addresses['address_book_id'] == $customer_default_address_id) {
        $address[$i]['default_address'] = '&nbsp;<small><i>' . PRIMARY_ADDRESS . '</i></small>';
    }
    $address[$i]['name'] = tep_output_string_protected($addresses['firstname'] . ' ' . $addresses['lastname']);
    $address[$i]['address'] = tep_address_format($format_id, $addresses, true, ' ', '<br>');
    $i++;
}
$xoopsTpl->assign("address", $address);
$xoopsTpl->assign("account", tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));
$xoopsTpl->assign("bt_back", tep_image_button('button_back.gif', IMAGE_BUTTON_BACK));
if (tep_count_customer_address_book_entries() < MAX_ADDRESS_BOOK_ENTRIES) {
    $xoopsTpl->assign("entries", 1);
    $xoopsTpl->assign("entries_link", tep_href_link(FILENAME_ADDRESS_BOOK_PROCESS, '', 'SSL'));
    $xoopsTpl->assign("bt_add_adr", tep_image_button('button_add_address.gif', IMAGE_BUTTON_ADD_ADDRESS));
}
$xoopsTpl->assign("max_entries", sprintf(TEXT_MAXIMUM_ENTRIES, MAX_ADDRESS_BOOK_ENTRIES));
include_once XOOPS_ROOT_PATH . '/footer.php';
include XOOPS_ROOT_PATH . "/modules/osC/includes/application_bottom.php";
Ejemplo n.º 25
0
     // BOF content type fix by AlexStudio
     /* One Page Checkout - BEGIN */
     $sendToFormatted = tep_address_label($customer_id, $sendto, 0, '', "\n");
     if (ONEPAGE_CHECKOUT_ENABLED == 'True') {
         $sendToFormatted = $onePageCheckout->getAddressFormatted('sendto');
     }
     $billToFormatted = tep_address_label($customer_id, $billto, 0, '', "\n");
     if (ONEPAGE_CHECKOUT_ENABLED == 'True') {
         $billToFormatted = $onePageCheckout->getAddressFormatted('billto');
     }
     /* One Page Checkout - END */
     if ($content_type != 'virtual') {
         // EOF content type fix by AlexStudio
         $email_order .= "\n" . EMAIL_TEXT_DELIVERY_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->delivery['format_id'], $order->delivery, 0, '', "\n") . "\n";
     }
     $email_order .= "\n" . EMAIL_TEXT_BILLING_ADDRESS . "\n" . EMAIL_SEPARATOR . "\n" . tep_address_format($order->billing['format_id'], $order->billing, 0, '', "\n") . "\n\n";
     if (is_object(${$payment})) {
         $email_order .= EMAIL_TEXT_PAYMENT_METHOD . "\n" . EMAIL_SEPARATOR . "\n";
         $payment_class = ${$payment};
         $email_order .= $payment_class->title . "\n\n";
         if ($payment_class->email_footer) {
             $email_order .= $payment_class->email_footer . "\n\n";
         }
     }
     tep_mail($order->customer['name'], $order->customer['email_address'], EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
     // send emails to other people
     if (SEND_EXTRA_ORDER_EMAILS_TO != '') {
         tep_mail('', SEND_EXTRA_ORDER_EMAILS_TO, EMAIL_TEXT_SUBJECT, $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);
     }
 }
 // END STATUS == COMPLETED LOOP
Ejemplo n.º 26
0
        } elseif (strpos(REQUEST_URI, '?') !== false) {
            $link = REQUEST_URI . '&amp;action=process_' . $form_type;
        } else {
            $link = REQUEST_URI . '?action=process_' . $form_type;
        }
        $customer_delivery_address = '';
        $customer_phone_number = '';
        $customer_name = '';
        $customer_email = '';
        if (tep_session_is_registered('customer_id') && !$is_dummy_account) {
            $address_query = tep_db_query("select address_book_id, 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, entry_telephone from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int) $customer_id . "' and address_book_id = '" . (int) $customer_default_address_id . "'");
            $address = tep_db_fetch_array($address_query);
            $format_id = tep_get_address_format_id($address['country_id']);
            $customer_email_info_query = tep_db_query("select customers_email_address from " . TABLE_CUSTOMERS . " where customers_id = '" . (int) $customer_id . "'");
            $customer_email_info = tep_db_fetch_array($customer_email_info_query);
            $customer_delivery_address = tep_address_format($format_id, $address, true, '', "\n");
            $customer_phone_number = $address['entry_telephone'];
            $customer_name = trim($customer_first_name . ' ' . $customer_last_name);
            $customer_email = $customer_email_info['customers_email_address'];
        }
        if (HTTP_SERVER == 'http://www.setbook.com.ua') {
            $currencies_array = array(array('id' => 'RUR', 'text' => ENTRY_REQUEST_FORM_CURRENCY_RUR));
        } else {
            $currencies_array = array(array('id' => '', 'text' => ENTRY_REQUEST_FORM_CURRENCY), array('id' => 'USD', 'text' => ENTRY_REQUEST_FORM_CURRENCY_USD), array('id' => 'EUR', 'text' => ENTRY_REQUEST_FORM_CURRENCY_EUR), array('id' => 'GBP', 'text' => ENTRY_REQUEST_FORM_CURRENCY_GBP), array('id' => 'RUR', 'text' => ENTRY_REQUEST_FORM_CURRENCY_RUR));
        }
        ob_start();
        echo tep_draw_form('contact_us', $link, 'post', 'class="form-div"');
        ?>
	<fieldset>
	<legend><?php 
        echo ENTRY_REQUEST_FORM_CONTACTS;
Ejemplo n.º 27
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 tep_address_format($order->delivery['format_id'], $order->delivery, 1, '', '<br>');
?>
</td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><?php 
echo tep_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
  </tr>
  <tr>
    <td><table border="0" cellspacing="0" cellpadding="2">
Ejemplo n.º 28
0
list($order_shipping_title, $order_shipping_value) = explode('_', $shipping['id']);
$self_delivery_id = (int) $order_shipping_value;
if ($order_shipping_title == 'slf') {
    $order_shipping_id = 1;
    if ($self_delivery_id > 0) {
        $self_delivery_query = tep_db_query("select * from " . TABLE_SELF_DELIVERY . " where self_delivery_id = '" . (int) $self_delivery_id . "'");
        $self_delivery = tep_db_fetch_array($self_delivery_query);
        if (!is_array($self_delivery)) {
            $self_delivery = array();
        }
        reset($self_delivery);
        while (list($k, $v) = each($self_delivery)) {
            $k = str_replace('entry_', '', $k);
            $self_delivery[$k] = $v;
        }
        $self_delivery_address = tep_address_format($order->delivery['format_id'], $self_delivery, 1, '', ', ');
        tep_db_query("update " . TABLE_ORDERS . " set delivery_self_address = '" . tep_db_input($self_delivery_address) . "' where orders_id = '" . (int) $insert_id . "'");
    }
}
tep_order_log($insert_id, 'Order self_delivery updated');
$is_europe = '';
if (SHOP_ID == 9) {
    $delivery_country_info_query = tep_db_query("select entry_country_id from " . TABLE_ADDRESS_BOOK . " where address_book_id = '" . (int) $sendto . "'");
    $delivery_country_info = tep_db_fetch_array($delivery_country_info_query);
    $delivery_country_id = $delivery_country_info['entry_country_id'];
    $europe_country_check_query = tep_db_query("select count(*) as total from setbook_net." . TABLE_COUNTRIES . " where countries_id = '" . (int) $delivery_country_id . "'");
    $europe_country_check = tep_db_fetch_array($europe_country_check_query);
    if ($europe_country_check['total'] > 0) {
        $is_europe = 'e';
    }
}
Ejemplo n.º 29
0
function tep_upload_order($order_id, $delimiter = ',', $upload_dir = '')
{
    if (empty($upload_dir)) {
        $upload_dir = UPLOAD_DIR . 'orders1/';
    }
    //	$order_info_query = tep_db_query("select orders_id from " . TABLE_ORDERS . " where orders_id = '" . (int)$order_id . "'");
    //	if (tep_db_num_rows($order_info_query) < 1) return false;
    $order_info = tep_db_fetch_array($order_info_query);
    $insert_id = $order_info['orders_id'];
    $insert_id = $order_id;
    $order = new order($insert_id);
    $shop_info_query = tep_db_query("select shops_url, shops_ssl, shops_prefix, shops_database from " . TABLE_SHOPS . " where shops_id = '" . (int) $order->info['shops_id'] . "'");
    $shop_info = tep_db_fetch_array($shop_info_query);
    $domain_zone = $shop_info['shops_prefix'];
    $payment_modules = tep_get_payment_modules($order->info['shops_id']);
    $shipping_modules = tep_get_shipping_modules($order->info['shops_id']);
    $order_file = $upload_dir . $domain_zone . $insert_id . '.csv';
    if (!file_exists($order_file)) {
        $fp = fopen($order_file, 'w');
        $order_history_link = ($order->info['enabled_ssl'] == '1' && tep_not_null($shop_info['shops_ssl']) ? $shop_info['shops_ssl'] : $shop_info['shops_url']) . '/account_history_info.php?order_id=' . $insert_id;
        $order_total_sum = 0;
        $order_shipping_sum = 0;
        $order_discount_sum = 0;
        reset($order->totals);
        while (list(, $order_total) = each($order->totals)) {
            if ($order_total['class'] == 'ot_total') {
                $order_total_sum = $order_total['value'];
            } elseif ($order_total['class'] == 'ot_shipping') {
                $order_shipping_sum = $order_total['value'];
                $order_shipping_title = $order_total['title'];
            } elseif (($order_total['class'] == 'ot_discount' || $order_total['class'] == 'ot_custom') && $order_total['value'] < 0) {
                $order_discount_sum = $order_total['value'];
            }
        }
        $order_payment_id = $order->info['payment_method_class'];
        if (empty($order_payment_id)) {
            reset($payment_modules);
            $payment_found = false;
            while (list($k, $v) = each($payment_modules)) {
                if (strpos($v, $order->info['payment_method']) !== false) {
                    $order_payment_id = $k;
                    break;
                }
            }
            if (empty($order_payment_id)) {
                $order_payment_id = $order->info['payment_method'];
            }
        }
        $order_shipping_id = $order->delivery['delivery_method_class'];
        if (empty($order_shipping_id)) {
            reset($shipping_modules);
            $shipping_found = false;
            while (list($k, $v) = each($shipping_modules)) {
                if (strpos($v, $order_shipping_title) !== false) {
                    $order_shipping_id = $k;
                    break;
                }
            }
            if (empty($order_shipping_id)) {
                $order_shipping_id = $order_shipping_title;
            }
        }
        $self_delivery_id = $order->delivery['delivery_self_address_id'];
        if (tep_not_null($order->delivery['delivery_self_address']) && (int) $self_delivery_id <= 0) {
            $shop_info_query = tep_db_query("select shops_database from " . TABLE_SHOPS . " where shops_id = '" . (int) $order->info['shops_id'] . "'");
            $shop_info = tep_db_fetch_array($shop_info_query);
            tep_db_select_db($shop_info['shops_database']);
            $self_delivery_query = tep_db_query("select self_delivery_id, self_delivery_cost, self_delivery_free, entry_suburb as suburb, entry_city as city, entry_street_address as street_address, entry_telephone as telephone, self_delivery_description from " . TABLE_SELF_DELIVERY . " where 1 order by city, street_address");
            while ($self_delivery = tep_db_fetch_array($self_delivery_query)) {
                $self_delivery_address = tep_address_format($order->delivery['format_id'], $self_delivery, 1, '', ', ');
                if (strpos($order->delivery['delivery_self_address'], $self_delivery_address) !== false) {
                    $self_delivery_id = $self_delivery['self_delivery_id'];
                    break;
                }
            }
            tep_db_select_db(DB_DATABASE);
            if ($self_delivery_id == 0) {
                $self_delivery_id = $order->info['self_delivery'];
            }
        }
        $date_purchased = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$3.$2.$1 $4:$5:$6', $order->info['date_purchased']);
        $date_purchased = preg_replace('/\\s{2,}/', ' ', $date_purchased);
        $is_europe = '';
        $europe_check_query = tep_db_query("select count(*) as total from setbook_eu." . TABLE_COUNTRIES . " where countries_name like '" . tep_db_input($order->delivery['country']) . "' or countries_ru_name like '" . tep_db_input($order->delivery['country']) . "' or countries_iso_code_2 like '" . tep_db_input($order->delivery['country']) . "' or countries_iso_code_3 like '" . tep_db_input($order->delivery['country']) . "'");
        $europe_check = tep_db_fetch_array($europe_check_query);
        if ($europe_check['total'] > 0) {
            $is_europe = 'e';
        }
        $order_delivery_country_code = '';
        $country_code_info_query = tep_db_query("select countries_iso_code_2 from " . $shop_info['shops_database'] . "." . TABLE_COUNTRIES . " where countries_name = '" . tep_db_input($order->delivery['country']) . "' or countries_ru_name = '" . tep_db_input($order->delivery['country']) . "'");
        $country_code_info = tep_db_fetch_array($country_code_info_query);
        $order_delivery_country_code = $country_code_info['countries_iso_code_2'];
        if ($order_delivery_country_code == '') {
            $order_delivery_country = strtolower($order->delivery['country']);
            $all_countries_file = UPLOAD_DIR . 'csv/all_countries.csv';
            $fc = fopen($all_countries_file, 'r');
            while ((list($country_name, $country_ru_name, $country_iso_code_2, $country_iso_code_3) = fgetcsv($fc, 40000, ";")) !== FALSE) {
                $country_name = strtolower($country_name);
                $country_ru_name = strtolower($country_ru_name);
                $country_iso_code_3 = strtolower($country_iso_code_3);
                if ($order_delivery_country == $country_name || $order_delivery_country == $country_ru_name || $order_delivery_country == $country_iso_code_3) {
                    $order_delivery_country_code = $country_iso_code_2;
                    break;
                }
            }
            fclose($fc);
        }
        if ($order_delivery_country_code == '') {
            $fc = fopen($all_countries_file, 'r');
            while ((list($country_name, $country_ru_name, $country_iso_code_2, $country_iso_code_3) = fgetcsv($fc, 40000, ";")) !== FALSE) {
                $country_name = strtolower($country_name);
                $country_ru_name = strtolower($country_ru_name);
                if (strpos($country_name, $order_delivery_country) !== false || strpos($country_ru_name, $order_delivery_country) !== false || strpos($country_iso_code_3, $order_delivery_country) !== false) {
                    $order_delivery_country_code = $country_iso_code_2;
                    break;
                }
            }
            fclose($fc);
        }
        $common_data = array($insert_id, $date_purchased, $order->info['shops_id'], $order->customer['id'], $order->customer['email_address'], $order->delivery['name'], '', '', $order_payment_id, $order_shipping_id, str_replace(',', '.', $order_shipping_sum), $order->info['currency'], str_replace(',', '.', $order->info['currency_value']), tep_html_entity_decode($order->delivery['state']), tep_html_entity_decode($order->delivery['suburb']), tep_html_entity_decode($order->delivery['city']), $order->delivery['postcode'], tep_html_entity_decode($order->delivery['street_address']), $order->delivery['telephone'], tep_html_entity_decode($order->info['comments']), $self_delivery_id, $order_history_link, str_replace(',', '.', $order_total_sum), str_replace(',', '.', abs($order_discount_sum)), tep_html_entity_decode($order->customer['company']), $order->customer['company_inn'], $order->customer['company_kpp'], $order->customer['company_address_corporate'], $is_europe, $order->info['delivery_transfer_days'], $order->info['code'], $order->delivery['country'], tep_html_entity_decode($order_delivery_country_code), $order->customer['company_corporate']);
        fputcsvsafe($fp, $common_data, $delimiter);
        //	  tep_db_query("update " . TABLE_ORDERS . " set payment_method_class = '" . tep_db_input($order_payment_id) . "', delivery_method_class = '" . tep_db_input($order_shipping_id) . "', delivery_self_address_id = '" . (int)$self_delivery_id . "' where orders_id = '" . (int)$insert_id . "'");
        reset($order->products);
        while (list(, $product) = each($order->products)) {
            $product_code = (int) str_replace('bbk', '', $product['code']);
            $common_data = array($product['type'], $product_code, $product['qty'], str_replace(',', '.', $product['final_price']), $product['id'], $product['seller_code'], $product['name'], tep_get_products_name($product['id']), $product['code'], $product['warranty']);
            fputcsvsafe($fp, $common_data, $delimiter);
        }
        fclose($fp);
    }
}
Ejemplo n.º 30
0
     } else {
         $showweight = '';
     }
     if (CARTSHIP_SHOWIC == 'true') {
         //ishazer remover hard code for version 2.20 : $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
         $ShipTxt .= '<tr><td class="main">' . ($total_count == 1 ? ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
     }
     $addresses_query = tep_db_query("select address_book_id, 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 " . TABLE_ADDRESS_BOOK . " where customers_id = '" . $customer_id . "'");
     // only display addresses if more than 1
     if (tep_db_num_rows($addresses_query) > 1) {
         while ($addresses = tep_db_fetch_array($addresses_query)) {
             $addresses_array[] = array('id' => $addresses['address_book_id'], 'text' => tep_address_format(tep_get_address_format_id($addresses['country_id']), $addresses, 0, ' ', ' '));
         }
         $ShipTxt .= '<tr><td colspan="3" class="main" nowrap>' . CART_SHIPPING_METHOD_ADDRESS . '&nbsp;' . tep_draw_pull_down_menu('address_id', $addresses_array, $selected_address, 'onchange="return shipincart_submit(\'\');"') . '</td></tr>';
     }
     $ShipTxt .= '<tr valign="top"><td class="main"><b>' . CART_SHIPPING_METHOD_TO . '</b>&nbsp;</td><td colspan="2" class="main">' . tep_address_format($order->delivery['format_id'], $order->delivery, 1, ' ', '<br>') . '</td></tr>';
 } else {
     // not logged in
     $ShipTxt .= CART_SHIPPING_OPTIONS_LOGIN;
     if (CARTSHIP_SHOWIC == 'true') {
         //azer for 2.20:      $ShipTxt.='<tr><td class="main">' . ($total_count == 1 ? ' <b>Item:</b></td><td colspan="2" class="main">' : ' <b>Items:</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
         $ShipTxt .= '<tr><td class="main" nowrap>' . ($total_count == 1 ? ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main" nowrap>' : ' <b>' . CART_ITEM . '</b></td><td colspan="2" class="main">') . $total_count . $showweight . '</td></tr>';
     }
     if ($cart->get_content_type() != 'virtual') {
         if (CARTSHIP_SHOWCDD == 'true') {
             $ShipTxt .= '<tr><td colspan="3" class="main" nowrap>' . ENTRY_COUNTRY . '&nbsp;' . tep_get_country_list('country_id', $selected_country, 'style="width=200"') . '<br />';
         }
         //add state zone_id
         $state_array[] = array('id' => '', 'text' => 'Please Select');
         $state_query = tep_db_query("select zone_name, zone_id from " . TABLE_ZONES . " where zone_country_id = '{$selected_country}' order by zone_country_id DESC, zone_name");
         while ($state_values = tep_db_fetch_array($state_query)) {