<h3 class="no-margin-top no-margin-bottom"><?php echo $lC_Language->get('box_ordering_steps_delivery'); ?> </h3> </div> <div class="panel-body no-padding-bottom"> <div class="row"> <div class="col-sm-4 col-lg-4"> <div class="well relative no-padding-bottom"> <h4 class="no-margin-top"><?php echo $lC_Language->get('ship_to_address'); ?> </h4> <address> <?php echo lC_Address::format($lC_ShoppingCart->getShippingAddress(), '<br />'); ?> </address> <div class="checkbox"> <input type="checkbox" name="shipto_as_billable" id="shipto_as_billable"><label class="small-margin-left"><?php echo $lC_Language->get('billable_address_checkbox'); ?> </label> </div> <div class="btn-group clearfix absolute-top-right small-padding-right small-padding-top"> <button type="button" onclick="document.location.href='<?php echo lc_href_link(FILENAME_CHECKOUT, 'shipping_address', 'SSL'); ?> '" class="btn btn-default btn-xs"><?php echo $lC_Language->get('button_edit');
public static function formData($id = null) { global $lC_Database, $lC_Language, $_module; $lC_Language->loadIniFile('customers.php'); $result = array(); $Qgroups = $lC_Database->query('select customers_group_id, customers_group_name from :table_customers_groups where language_id = :language_id order by customers_group_name'); $Qgroups->bindTable(':table_customers_groups', TABLE_CUSTOMERS_GROUPS); $Qgroups->bindInt(':language_id', $lC_Language->getID()); $Qgroups->execute(); $groups_array = array(); while ($Qgroups->next()) { $groups_array[$Qgroups->value('customers_group_id')] = $Qgroups->value('customers_group_name'); } $result['groupsArray'] = $groups_array; if ($id != null) { $result['customerData'] = lC_Customers_Admin::getData($id); $Qaddresses = lC_Customers_Admin::getAddressBookData($id); $cnt = 0; $result['addressBook'] = ''; $body .= '<ul class="list spaced">'; while ($Qaddresses->next()) { $primary = $result['customerData']['customers_default_address_id'] == $Qaddresses->valueInt('address_book_id') ? 'true' : 'false'; $body .= '<li class="">'; $body .= '<span class="button-group compact float-right">' . ' <a href="' . ((int) ($_SESSION['admin']['access'][$_module] < 3) ? '#' : 'javascript://" onclick="editAddress(\'' . $Qaddresses->valueInt('address_book_id') . '\', \'' . $primary . '\')') . '" class="button icon-pencil' . ((int) ($_SESSION['admin']['access'][$_module] < 3) ? ' disabled' : NULL) . '">' . $lC_Language->get('icon_edit') . '</a>' . ' <a href="' . ((int) ($_SESSION['admin']['access'][$_module] < 4) ? '#' : 'javascript://" onclick="deleteAddress(\'' . $Qaddresses->valueInt('address_book_id') . '\')') . '" class="button icon-trash with-tooltip' . ((int) ($_SESSION['admin']['access'][$_module] < 4) ? ' disabled' : NULL) . '" title="' . $lC_Language->get('icon_delete') . '"></a>' . '</span>'; if (ACCOUNT_GENDER > -1) { switch ($Qaddresses->value('gender')) { case 'm': $body .= '<span>' . lc_icon_admin('male.png') . '</span>'; break; case 'f': $body .= '<span>' . lc_icon_admin('female.png') . '</span>'; break; default: $body .= '<span>' . lc_icon_admin('people.png') . '</span>'; break; } } else { $body .= '<span>' . lc_icon_admin('people.png') . '</span>'; } $body .= '<span class="small-margin-left">' . lC_Address::format($Qaddresses->toArray(), ' <br /> ') . '</span>'; if ($primary == 'true') { $body .= '<small class="tag small-margin-left purple-gradient glossy" style="position:absolute; top:12px; right:88px;">' . $lC_Language->get('primary_address') . '</small>'; } $body .= '<span class="icon-phone icon-blue" style="position:absolute; top:17px; left:200px;">'; if (!lc_empty($Qaddresses->valueProtected('telephone_number'))) { $body .= $Qaddresses->valueProtected('telephone_number'); } else { $body .= '<small class="tag silver-gradient glossy"><i>' . $lC_Language->get('no_telephone_number') . '</i></small>'; } $body .= '</span>'; $body .= '<span class="icon-printer icon-orange" style="position:absolute; top:46px; left:200px;">'; if (!lc_empty($Qaddresses->valueProtected('fax_number'))) { $body .= $Qaddresses->valueProtected('fax_number'); } else { $body .= '<small class="tag silver-gradient glossy"><i>' . $lC_Language->get('no_fax_number') . '</i></small>'; } $body .= '</span>'; $body .= '</li>'; $cnt++; } $body .= '</ul>'; $result['addressBook'] = $body; // set default country to store country $country_id = STORE_COUNTRY; $Qzones = $lC_Database->query('select zone_name from :table_zones where zone_country_id = :zone_country_id order by zone_name'); $Qzones->bindTable(':table_zones', TABLE_ZONES); $Qzones->bindInt(':zone_country_id', $country_id); $Qzones->execute(); $zones_array = array(); while ($Qzones->next()) { $zones_array[] = array('id' => $Qzones->value('zone_name'), 'text' => $Qzones->value('zone_name')); } $result['abState'] = lc_draw_pull_down_menu('ab_state', $zones_array, null, 'class="input with-small-padding" style="width:73%;"'); } $countries_array = array(); foreach (lC_Address::getCountries() as $country) { $countries_array[$country['id']] = $country['name']; } $result['countriesArray'] = $countries_array; return $result; }
<td><?php echo '<a href="mailto:' . $lC_Order->getCustomer('email_address') . '"><u>' . $lC_Order->getCustomer('email_address') . '</u></a>'; ?> </td> </tr> </table></td> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td><b><?php echo $lC_Language->get('subsection_shipping_address'); ?> </b></td> </tr> <tr> <td><?php echo lC_Address::format($lC_Order->getDelivery(), '<br />'); ?> </td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td> </td> </tr> <tr> <td><table border="0" cellspacing="0" cellpadding="2"> <tr> <td><b><?php echo $lC_Language->get('subsection_payment_method');
<div class="col-sm-12 col-lg-12"> <h3 class="no-margin-top"><?php echo $lC_Language->get('address_book_title'); ?> </h3> <?php $Qaddresses = lC_AddressBook::getListing(); while ($Qaddresses->next()) { echo '<div class="well relative">' . "\n"; echo ' <address class="no-margin-bottom">' . "\n"; echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); if ($Qaddresses->valueInt('address_book_id') == $lC_Customer->getDefaultAddressID()) { echo ' <small class="margin-left"><i>' . $lC_Language->get('primary_address_marker') . '</i></small>'; } echo ' <br />' . "\n"; echo lC_Address::format($Qaddresses->toArray(), '<br />'); echo ' </address>' . "\n"; ?> <div class="btn-group clearfix absolute-top-right-large-padding"> <form action="<?php echo lc_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&edit', 'SSL'); ?> " class="display-inline" method="post"><button onclick="$(this).closest('form').submit();" type="button" class="btn btn-default btn-xs"><?php echo $lC_Language->get('button_edit'); ?> </button></form> <form action="<?php echo lc_href_link(FILENAME_ACCOUNT, 'address_book=' . $Qaddresses->valueInt('address_book_id') . '&delete', 'SSL'); ?> " class="display-inline" method="post"><button onclick="$(this).closest('form').submit();" type="button" class="btn btn-default btn-xs"><?php echo $lC_Language->get('button_delete');
public function sendEmail($id) { global $lC_Database, $lC_Language, $lC_Currencies, $lC_ShoppingCart; $Qorder = $lC_Database->query('select * from :table_orders where orders_id = :orders_id limit 1'); $Qorder->bindTable(':table_orders', TABLE_ORDERS); $Qorder->bindInt(':orders_id', $id); $Qorder->execute(); if ($Qorder->numberOfRows() === 1) { $email_order = STORE_NAME . "\n" . $lC_Language->get('email_order_separator') . "\n" . sprintf($lC_Language->get('email_order_order_number'), $id) . "\n" . sprintf($lC_Language->get('email_order_invoice_url'), lc_href_link(FILENAME_ACCOUNT, 'receipt=' . $id, 'SSL', false, true, true)) . "\n" . sprintf($lC_Language->get('email_order_date_ordered'), lC_DateTime::getLong()) . "\n\n" . $lC_Language->get('email_order_products') . "\n" . $lC_Language->get('email_order_separator') . "\n"; $Qproducts = $lC_Database->query('select orders_products_id, products_model, products_sku, products_name, products_price, products_tax, products_quantity from :table_orders_products where orders_id = :orders_id order by orders_products_id'); $Qproducts->bindTable(':table_orders_products', TABLE_ORDERS_PRODUCTS); $Qproducts->bindInt(':orders_id', $id); $Qproducts->execute(); while ($Qproducts->next()) { $skuModel = $Qproducts->value('products_model') != NULL ? $Qproducts->value('products_model') : NULL; if ($skuModel == NULL) { $skuModel == ($Qproducts->value('products_sku') != NULL) ? $Qproducts->value('products_sku') : NULL; } $email_order .= $Qproducts->valueInt('products_quantity') . ' x ' . $Qproducts->value('products_name') . ' (' . $skuModel . ') = ' . $lC_Currencies->displayPriceWithTaxRate($Qproducts->value('products_price'), $Qproducts->value('products_tax'), $Qproducts->valueInt('products_quantity'), false, $Qorder->value('currency'), $Qorder->value('currency_value')) . "\n"; $Qvariants = $lC_Database->query('select group_title, value_title from :table_orders_products_variants where orders_id = :orders_id and orders_products_id = :orders_products_id order by id'); $Qvariants->bindTable(':table_orders_products_variants', TABLE_ORDERS_PRODUCTS_VARIANTS); $Qvariants->bindInt(':orders_id', $id); $Qvariants->bindInt(':orders_products_id', $Qproducts->valueInt('orders_products_id')); $Qvariants->execute(); while ($Qvariants->next()) { $email_order .= "\t" . $Qvariants->value('group_title') . ': ' . $Qvariants->value('value_title') . "\n"; } } unset($Qproducts); unset($Qvariants); $email_order .= $lC_Language->get('email_order_separator') . "\n"; $Qtotals = $lC_Database->query('select title, text from :table_orders_total where orders_id = :orders_id order by sort_order'); $Qtotals->bindTable(':table_orders_total', TABLE_ORDERS_TOTAL); $Qtotals->bindInt(':orders_id', $id); $Qtotals->execute(); while ($Qtotals->next()) { $email_order .= strip_tags($Qtotals->value('title') . ' ' . $Qtotals->value('text')) . "\n"; } unset($Qtotals); if (lc_empty($Qorder->value('delivery_name')) === false && lc_empty($Qorder->value('delivery_street_address')) === false) { $address = array('name' => $Qorder->value('delivery_name'), 'company' => $Qorder->value('delivery_company'), 'street_address' => $Qorder->value('delivery_street_address'), 'suburb' => $Qorder->value('delivery_suburb'), 'city' => $Qorder->value('delivery_city'), 'state' => $Qorder->value('delivery_state'), 'zone_code' => $Qorder->value('delivery_state_code'), 'country_title' => $Qorder->value('delivery_country'), 'country_iso2' => $Qorder->value('delivery_country_iso2'), 'country_iso3' => $Qorder->value('delivery_country_iso3'), 'postcode' => $Qorder->value('delivery_postcode'), 'format' => $Qorder->value('delivery_address_format')); $email_order .= "\n" . $lC_Language->get('email_order_delivery_address') . "\n" . $lC_Language->get('email_order_separator') . "\n" . lC_Address::format($address) . "\n"; unset($address); } $address = array('name' => $Qorder->value('billing_name'), 'company' => $Qorder->value('billing_company'), 'street_address' => $Qorder->value('billing_street_address'), 'suburb' => $Qorder->value('billing_suburb'), 'city' => $Qorder->value('billing_city'), 'state' => $Qorder->value('billing_state'), 'zone_code' => $Qorder->value('billing_state_code'), 'country_title' => $Qorder->value('billing_country'), 'country_iso2' => $Qorder->value('billing_country_iso2'), 'country_iso3' => $Qorder->value('billing_country_iso3'), 'postcode' => $Qorder->value('billing_postcode'), 'format' => $Qorder->value('billing_address_format')); $email_order .= "\n" . $lC_Language->get('email_order_billing_address') . "\n" . $lC_Language->get('email_order_separator') . "\n" . lC_Address::format($address) . "\n\n"; unset($address); $Qstatus = $lC_Database->query('select orders_status_name from :table_orders_status where orders_status_id = :orders_status_id and language_id = :language_id'); $Qstatus->bindTable(':table_orders_status', TABLE_ORDERS_STATUS); $Qstatus->bindInt(':orders_status_id', $Qorder->valueInt('orders_status')); $Qstatus->bindInt(':language_id', $lC_Language->getID()); $Qstatus->execute(); $email_order .= sprintf($lC_Language->get('email_order_status'), $Qstatus->value('orders_status_name')) . "\n" . $lC_Language->get('email_order_separator') . "\n"; unset($Qstatus); $Qstatuses = $lC_Database->query('select date_added, comments from :table_orders_status_history where orders_id = :orders_id and comments != "" order by orders_status_history_id'); $Qstatuses->bindTable(':table_orders_status_history', TABLE_ORDERS_STATUS_HISTORY); $Qstatuses->bindInt(':orders_id', $id); $Qstatuses->execute(); while ($Qstatuses->next()) { $email_order .= lC_DateTime::getLong($Qstatuses->value('date_added')) . "\n\t" . wordwrap(str_replace("\n", "\n\t", $Qstatuses->value('comments')), 60, "\n\t", 1) . "\n\n"; } unset($Qstatuses); if (is_object($lC_ShoppingCart)) { $email_order .= $lC_Language->get('email_order_payment_method') . "\n" . $lC_Language->get('email_order_separator') . "\n"; $email_order .= $Qorder->value('payment_method') . "\n\n"; /*if (isset($this->email_footer)) { $email_order .= $this->email_footer . "\n\n"; }*/ } lc_email($Qorder->value('customers_name'), $Qorder->value('customers_email_address'), $lC_Language->get('email_order_subject'), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); // send emails to other people if (SEND_EXTRA_ORDER_EMAILS_TO != '') { lc_email('', SEND_EXTRA_ORDER_EMAILS_TO, $lC_Language->get('email_order_subject'), $email_order, STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS); } } unset($Qorder); }
?> </h1> <?php if ($lC_MessageStack->size('create') > 0) { echo '<div class="message-stack-container alert alert-danger small-margin-bottom small-margin-left">' . $lC_MessageStack->get('create') . '</div>' . "\n"; } ?> <div class="row"> <div class="col-sm-6 col-lg-6"> <h3 class="small-margin-top"><?php echo $lC_Language->get('selected_address_title'); ?> </h3> <div class="well"> <address class="small-margin-bottom no-margin-top"><?php echo lC_Address::format(preg_replace('/[^0-9]/', '', $_GET['address_book']), '<br />'); ?> </address> </div> </div> <div class="col-sm-6 col-lg-6"> <h3 class="small-margin-top"><?php echo $lC_Language->get('address_book_delete_address_title'); ?> </h3> <div class="well"> <p><?php echo $lC_Language->get('address_book_delete_address_description'); ?> </p>
<?php $radio_buttons = 0; $Qaddresses = $lC_Template->getListing(); while ($Qaddresses->next()) { echo '<table class="table no-margin-bottom content-checkout-address-selection-table">'; if ($Qaddresses->valueInt('address_book_id') == $lC_ShoppingCart->getShippingAddress('id') || lC_AddressBook::numberOfEntries() == 1) { echo '<tr class="module-row-selected cursor-pointer" id="default-selected" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } else { echo '<tr class="module-row cursor-pointer" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n"; } ?> <td class=""><span class="strong"><?php echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname'); ?> </span><br /><small><?php echo str_replace($Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname') . ', ', '', lC_Address::format($Qaddresses->toArray(), ', ')); ?> </small></td> <td class="text-right"><?php echo lc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $lC_ShoppingCart->getShippingAddress('id'), 'id="address_' . $radio_buttons . '"', ''); ?> </td> </tr> </table> <?php $radio_buttons++; } ?> </div> <?php }
} ?> </p> </div> <?php } ?> <div class="well relative no-padding-bottom"> <h4 class="no-margin-top"><?php echo $lC_Language->get('bill_to_address'); ?> </h4> <address> <?php echo lC_Address::format(lC_Success::getBillingAddress($oID, $lC_Customer->getID()), '<br />'); ?> </address> </div> <div class="well relative clearfix small-padding-top small-padding-bottom"> <h4><?php echo $lC_Language->get('payment_method_heading'); ?> </h4> <p><?php echo lC_Success::getPaymentMethod($oID); ?> </p> </div> <div class="well relative clearfix small-padding-top small-padding-bottom">
echo $lC_Language->get('receipt_billing_address_title'); ?> </strong><br/> <?php echo lC_Address::format($order->billing, '<br />'); ?> </address> </div> <div class="col-sm-3 col-lg-3"> <address> <strong><?php echo $lC_Language->get('receipt_delivery_address_title'); ?> </strong><br/> <?php echo lC_Address::format($order->delivery, '<br />'); ?> </address> </div> <div class="col-sm-6 col-lg-6"> <div class="well text-right"> <h3 class="no-margin-top"><?php echo $lC_Language->get('receipt_order_number_title'); ?> <?php echo $_GET['receipt']; ?> </h3> <div><strong><?php echo $lC_Language->get('receipt_order_date_title'); ?>