示例#1
0
 function confirm()
 {
     $OSCOM_Db = Registry::get('Db');
     $Qmail = $OSCOM_Db->get('customers', 'count(*) as count', ['customers_newsletter' => '1']);
     $confirm_string = '<table border="0" cellspacing="0" cellpadding="2">' . "\n" . '  <tr>' . "\n" . '    <td class="main"><font color="#ff0000"><strong>' . OSCOM::getDef('text_count_customers', ['count' => $Qmail->valueInt('count')]) . '</strong></font></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main"><strong>' . $this->title . '</strong></td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="main">' . "\n" . '      <ul class="nav nav-tabs" role="tablist">' . "\n" . '        <li role="presentation" class="active"><a href="#html_preview" aria-controls="html_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_html') . '</a></li>' . "\n" . '        <li role="presentation"><a href="#plain_preview" aria-controls="plain_preview" role="tab" data-toggle="tab">' . OSCOM::getDef('email_type_plain') . '</a></li>' . "\n" . '      </ul>' . "\n" . '      <div class="tab-content">' . "\n" . '        <div role="tabpanel" class="tab-pane active" id="html_preview">' . "\n" . '          <iframe id="emailHtmlPreviewContent" style="width: 100%; height: 400px; border: 0;"></iframe>' . "\n" . '          <script id="emailHtmlPreview" type="x-tmpl-mustache">' . "\n" . '            ' . HTML::outputProtected($this->content_html) . "\n" . '          </script>' . "\n" . '          <script>' . "\n" . '            $(function() {' . "\n" . '              var content = $(\'<div />\').html($(\'#emailHtmlPreview\').html()).text();' . "\n" . '              $(\'#emailHtmlPreviewContent\').contents().find(\'html\').html(content);' . "\n" . '            });' . "\n" . '          </script>' . "\n" . '        </div>' . "\n" . '        <div role="tabpanel" class="tab-pane" id="plain_preview">' . "\n" . '          ' . nl2br(HTML::outputProtected($this->content)) . "\n" . '        </div>' . "\n" . '      </div>' . "\n" . '    </td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td>&nbsp;</td>' . "\n" . '  </tr>' . "\n" . '  <tr>' . "\n" . '    <td class="smallText" align="right">' . HTML::button(OSCOM::getDef('image_send'), 'fa fa-envelope', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send')) . HTML::button(OSCOM::getDef('image_cancel'), 'fa fa-close', OSCOM::link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])) . '</td>' . "\n" . '  </tr>' . "\n" . '</table>';
     return $confirm_string;
 }
示例#2
0
 function getOutput()
 {
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     $output = '<table class="table table-hover">
                <thead>
                  <tr class="info">
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_title') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_date') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_reviews_reviewer') . '</th>
                    <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_reviews_rating') . '</th>
                    <th class="text-right">' . OSCOM::getDef('module_admin_dashboard_reviews_review_status') . '</th>
                  </tr>
                </thead>
                <tbody>';
     $Qreviews = $OSCOM_Db->get(['reviews r', 'products_description pd'], ['r.reviews_id', 'r.date_added', 'pd.products_name', 'r.customers_name', 'r.reviews_rating', 'r.reviews_status'], ['pd.products_id' => ['rel' => 'r.products_id'], 'pd.language_id' => $OSCOM_Language->getId()], 'r.date_added desc', 6);
     while ($Qreviews->fetch()) {
         $output .= '    <tr>
                       <td><a href="' . OSCOM::link(FILENAME_REVIEWS, 'rID=' . $Qreviews->valueInt('reviews_id') . '&action=edit') . '">' . $Qreviews->value('products_name') . '</a></td>
                       <td>' . DateTime::toShort($Qreviews->value('date_added')) . '</td>
                       <td>' . $Qreviews->valueProtected('customers_name') . '</td>
                       <td class="text-right">' . str_repeat('<i class="fa fa-star text-info"></i>', $Qreviews->valueInt('reviews_rating')) . str_repeat('<i class="fa fa-star-o"></i>', 5 - $Qreviews->valueInt('reviews_rating')) . '</td>
                       <td class="text-right"><i class="fa fa-circle ' . ($Qreviews->valueInt('reviews_status') === 1 ? 'text-success' : 'text-danger') . '"></i></td>
                     </tr>';
     }
     $output .= '  </tbody>
               </table>';
     return $output;
 }
示例#3
0
 function getOutput()
 {
     $result = $this->_getContent();
     $output = null;
     if (is_array($result) && !empty($result)) {
         $output = '<table class="table table-hover">
                 <thead>
                   <tr class="info">
                     <th>' . OSCOM::getDef('module_admin_dashboard_partner_news_title') . '</th>
                   </tr>
                 </thead>
                 <tbody>';
         foreach ($result as $p) {
             $output .= '    <tr>
                         <td><a href="' . $p['url'] . '" target="_blank"><strong>' . $p['title'] . '</strong></a> <span class="label label-info">' . $p['category_title'] . '</span><br />' . $p['status_update'] . '</td>
                       </tr>';
         }
         $output .= '    <tr>
                       <td class="text-right"><a href="https://www.oscommerce.com/Services" target="_blank">' . OSCOM::getDef('module_admin_dashboard_partner_news_more_title') . '</a></td>
                     </tr>
                   </tbody>
                 </table>';
     }
     return $output;
 }
示例#4
0
 function getOutput()
 {
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     $output = '<table class="table table-hover">
                <thead>
                  <tr class="info">
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_title') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_total') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_date') . '</th>
                    <th>' . OSCOM::getDef('module_admin_dashboard_orders_order_status') . '</th>
                  </tr>
                </thead>
                <tbody>';
     $Qorders = $OSCOM_Db->get(['orders o', 'orders_total ot', 'orders_status s'], ['o.orders_id', 'o.customers_name', 'greatest(o.date_purchased, ifnull(o.last_modified, 0)) as date_last_modified', 's.orders_status_name', 'ot.text as order_total'], ['o.orders_id' => ['rel' => 'ot.orders_id'], 'ot.class' => 'ot_total', 'o.orders_status' => ['rel' => 's.orders_status_id'], 's.language_id' => $OSCOM_Language->getId()], 'date_last_modified desc', 6);
     while ($Qorders->fetch()) {
         $output .= '    <tr>
                       <td><a href="' . OSCOM::link(FILENAME_ORDERS, 'oID=' . $Qorders->valueInt('orders_id') . '&action=edit') . '">' . $Qorders->valueProtected('customers_name') . '</a></td>
                       <td>' . strip_tags($Qorders->value('order_total')) . '</td>
                       <td>' . DateTime::toShort($Qorders->value('date_last_modified')) . '</td>
                       <td>' . $Qorders->value('orders_status_name') . '</td>
                     </tr>';
     }
     $output .= '  </tbody>
               </table>';
     return $output;
 }
 function execute()
 {
     global $PHP_SELF, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (basename($PHP_SELF) == 'index.php') {
         if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) {
             $Qmanufacturer = $OSCOM_Db->prepare('select
                                              m.manufacturers_name,
                                              mi.manufacturers_seo_title
                                            from
                                              :table_manufacturers m,
                                              :table_manufacturers_info mi
                                            where
                                              m.manufacturers_id = mi.manufacturers_id
                                              and m.manufacturers_id = :manufacturers_id
                                              and mi.languages_id = :languages_id');
             $Qmanufacturer->bindInt(':manufacturers_id', $_GET['manufacturers_id']);
             $Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getId());
             $Qmanufacturer->execute();
             if ($Qmanufacturer->fetch() !== false) {
                 if (tep_not_null($Qmanufacturer->value('manufacturers_seo_title')) && MODULE_HEADER_TAGS_MANUFACTURER_TITLE_SEO_TITLE_OVERRIDE == 'True') {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_seo_title') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 } else {
                     $oscTemplate->setTitle($Qmanufacturer->value('manufacturers_name') . OSCOM::getDef('module_header_tags_manufacturer_seo_separator') . $oscTemplate->getTitle());
                 }
             }
         }
     }
 }
 function execute()
 {
     global $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $OSCOM_Language = Registry::get('Language');
     if (isset($_GET['products_id'])) {
         $Qmanufacturer = $OSCOM_Db->prepare('select m.manufacturers_id, m.manufacturers_name, m.manufacturers_image, mi.manufacturers_url from :table_manufacturers m left join :table_manufacturers_info mi on (m.manufacturers_id = mi.manufacturers_id and mi.languages_id = :languages_id), :table_products p where p.products_id = :products_id and p.manufacturers_id = m.manufacturers_id');
         $Qmanufacturer->bindInt(':languages_id', $OSCOM_Language->getId());
         $Qmanufacturer->bindInt(':products_id', $_GET['products_id']);
         $Qmanufacturer->execute();
         if ($Qmanufacturer->fetch() !== false) {
             $manufacturer_info_string = null;
             if (!empty($Qmanufacturer->value('manufacturers_image'))) {
                 $manufacturer_info_string .= '<div>' . HTML::image(OSCOM::linkImage($Qmanufacturer->value('manufacturers_image')), $Qmanufacturer->value('manufacturers_name')) . '</div>';
             }
             if (!empty($Qmanufacturer->value('manufacturers_url'))) {
                 $manufacturer_info_string .= '<div class="text-center"><a href="' . OSCOM::link('redirect.php', 'action=manufacturer&manufacturers_id=' . $Qmanufacturer->valueInt('manufacturers_id')) . '" target="_blank">' . OSCOM::getDef('module_boxes_manufacturer_info_box_homepage', ['manufacturers_name' => $Qmanufacturer->value('manufacturers_name')]) . '</a></div>';
             }
             ob_start();
             include 'includes/modules/boxes/templates/manufacturer_info.php';
             $data = ob_get_clean();
             $oscTemplate->addBlock($data, $this->group);
         }
     }
 }
示例#7
0
 function quote($method = '')
 {
     global $order, $shipping_weight, $shipping_num_boxes;
     if (MODULE_SHIPPING_TABLE_MODE == 'price') {
         $order_total = $this->getShippableTotal();
     } else {
         $order_total = $shipping_weight;
     }
     $table_cost = preg_split("/[:,]/", MODULE_SHIPPING_TABLE_COST);
     $size = sizeof($table_cost);
     for ($i = 0, $n = $size; $i < $n; $i += 2) {
         if ($order_total <= $table_cost[$i]) {
             $shipping = $table_cost[$i + 1];
             break;
         }
     }
     if (MODULE_SHIPPING_TABLE_MODE == 'weight') {
         $shipping = $shipping * $shipping_num_boxes;
     }
     $this->quotes = array('id' => $this->code, 'module' => OSCOM::getDef('module_shipping_table_text_title'), 'methods' => array(array('id' => $this->code, 'title' => OSCOM::getDef('module_shipping_table_text_way'), 'cost' => $shipping + MODULE_SHIPPING_TABLE_HANDLING)));
     if ($this->tax_class > 0) {
         $this->quotes['tax'] = tep_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
     }
     if (tep_not_null($this->icon)) {
         $this->quotes['icon'] = HTML::image($this->icon, $this->title);
     }
     return $this->quotes;
 }
 function execute()
 {
     global $new_products_id_in_cart, $currencies, $oscTemplate;
     $cart_contents_string = '';
     if ($_SESSION['cart']->count_contents() > 0) {
         $cart_contents_string = NULL;
         $products = $_SESSION['cart']->get_products();
         for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
             $cart_contents_string .= '<li';
             if (isset($_SESSION['new_products_id_in_cart']) && $new_products_id_in_cart == $products[$i]['id']) {
                 $cart_contents_string .= ' class="newItemInCart"';
             }
             $cart_contents_string .= '>';
             $cart_contents_string .= $products[$i]['quantity'] . '&nbsp;x&nbsp;';
             $cart_contents_string .= '<a href="' . OSCOM::link('product_info.php', 'products_id=' . $products[$i]['id']) . '">';
             $cart_contents_string .= $products[$i]['name'];
             $cart_contents_string .= '</a></li>';
             if (isset($_SESSION['new_products_id_in_cart']) && $new_products_id_in_cart == $products[$i]['id']) {
                 unset($_SESSION['new_products_id_in_cart']);
             }
         }
         $cart_contents_string .= '<li class="text-right"><hr>' . $currencies->format($_SESSION['cart']->show_total()) . '</li>';
     } else {
         $cart_contents_string .= '<p>' . OSCOM::getDef('module_boxes_shopping_cart_box_cart_empty') . '</p>';
     }
     ob_start();
     include 'includes/modules/boxes/templates/shopping_cart.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
示例#9
0
 function execute()
 {
     global $login_customer_id, $messageStack, $oscTemplate;
     $OSCOM_Db = Registry::get('Db');
     $error = false;
     if (isset($_GET['action']) && $_GET['action'] == 'process' && isset($_POST['formid']) && $_POST['formid'] == $_SESSION['sessiontoken']) {
         $email_address = HTML::sanitize($_POST['email_address']);
         $password = HTML::sanitize($_POST['password']);
         // Check if email exists
         $Qcustomer = $OSCOM_Db->get('customers', ['customers_id', 'customers_password'], ['customers_email_address' => $email_address], null, 1);
         if ($Qcustomer->fetch() === false) {
             $error = true;
         } else {
             // Check that password is good
             if (!Hash::verify($password, $Qcustomer->value('customers_password'))) {
                 $error = true;
             } else {
                 // set $login_customer_id globally and perform post login code in catalog/login.php
                 $login_customer_id = $Qcustomer->valueInt('customers_id');
                 // migrate old hashed password to new php password_hash
                 if (Hash::needsRehash($Qcustomer->value('customers_password'))) {
                     $OSCOM_Db->save('customers', ['customers_password' => Hash::encrypt($password)], ['customers_id' => $login_customer_id]);
                 }
             }
         }
     }
     if ($error == true) {
         $messageStack->add('login', OSCOM::getDef('module_content_login_text_login_error'));
     }
     ob_start();
     include 'includes/modules/content/' . $this->group . '/templates/login_form.php';
     $template = ob_get_clean();
     $oscTemplate->addContent($template, $this->group);
 }
 function __construct()
 {
     $this->lang = Registry::get('Language');
     $this->code = get_class($this);
     $this->group = basename(dirname(__FILE__));
     $this->title = OSCOM::getDef('module_content_account_sage_pay_cards_title');
     $this->description = OSCOM::getDef('module_content_account_sage_pay_cards_description');
     if (defined('MODULE_CONTENT_ACCOUNT_SAGE_PAY_CARDS_STATUS')) {
         $this->sort_order = MODULE_CONTENT_ACCOUNT_SAGE_PAY_CARDS_SORT_ORDER;
         $this->enabled = MODULE_CONTENT_ACCOUNT_SAGE_PAY_CARDS_STATUS == 'True';
     }
     $this->public_title = OSCOM::getDef('module_content_account_sage_pay_cards_link_title');
     $sage_pay_enabled = false;
     if (defined('MODULE_PAYMENT_INSTALLED') && tep_not_null(MODULE_PAYMENT_INSTALLED) && in_array('sage_pay_direct.php', explode(';', MODULE_PAYMENT_INSTALLED))) {
         if (!class_exists('sage_pay_direct')) {
             $this->lang->loadDefinitions('modules/payment/sage_pay_direct');
             include OSCOM::getConfig('dir_root', 'Shop') . 'includes/modules/payment/sage_pay_direct.php';
         }
         $sage_pay_direct = new sage_pay_direct();
         if ($sage_pay_direct->enabled) {
             $sage_pay_enabled = true;
             if (MODULE_PAYMENT_SAGE_PAY_DIRECT_TRANSACTION_SERVER == 'Test') {
                 $this->title .= ' [Test]';
                 $this->public_title .= ' (' . $sage_pay_direct->code . '; Test)';
             }
         }
     }
     if ($sage_pay_enabled !== true) {
         $this->enabled = false;
         $this->description = '<div class="secWarning">' . OSCOM::getDef('module_content_account_sage_pay_cards_error_main_module') . '</div>' . $this->description;
     }
 }
示例#11
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_action_recorder_tell_a_friend_title');
     $this->description = OSCOM::getDef('module_action_recorder_tell_a_friend_description');
     if ($this->check()) {
         $this->minutes = (int) MODULE_ACTION_RECORDER_TELL_A_FRIEND_EMAIL_MINUTES;
     }
 }
示例#12
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_action_recorder_contact_us_title');
     $this->description = OSCOM::getDef('module_action_recorder_contact_us_description');
     if ($this->check()) {
         $this->minutes = (int) MODULE_ACTION_RECORDER_CONTACT_US_EMAIL_MINUTES;
     }
 }
示例#13
0
 function __construct()
 {
     $this->code = 'ot_loworderfee';
     $this->title = OSCOM::getDef('module_order_total_loworderfee_title');
     $this->description = OSCOM::getDef('module_order_total_loworderfee_description');
     $this->enabled = defined('MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS') && MODULE_ORDER_TOTAL_LOWORDERFEE_STATUS == 'true' ? true : false;
     $this->sort_order = defined('MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER') && (int) MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER > 0 ? (int) MODULE_ORDER_TOTAL_LOWORDERFEE_SORT_ORDER : 0;
     $this->output = array();
 }
示例#14
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_category_seo_title');
     $this->description = OSCOM::getDef('module_header_tags_category_seo_description');
     if (defined('MODULE_HEADER_TAGS_CATEGORY_SEO_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_CATEGORY_SEO_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_CATEGORY_SEO_STATUS == 'True';
     }
 }
示例#15
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_mailchimp_360_title');
     $this->description = OSCOM::getDef('module_header_tags_mailchimp_360_description');
     if (defined('MODULE_HEADER_TAGS_MAILCHIMP_360_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_MAILCHIMP_360_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_MAILCHIMP_360_STATUS == 'True';
     }
 }
示例#16
0
 function execute()
 {
     global $oscTemplate;
     $form_output = HTML::form('quick_find', OSCOM::link('advanced_search_result.php', '', false), 'get', null, ['session_id' => true]) . '<div class="input-group">' . HTML::inputField('keywords', '', 'required placeholder="' . OSCOM::getDef('text_search_placeholder') . '"', 'search') . '<span class="input-group-btn"><button type="submit" class="btn btn-search"><i class="fa fa-search"></i></button></span></div>' . HTML::hiddenField('search_in_description', '0') . '</form>';
     ob_start();
     include 'includes/modules/boxes/templates/search.php';
     $data = ob_get_clean();
     $oscTemplate->addBlock($data, $this->group);
 }
示例#17
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_robot_noindex_title');
     $this->description = OSCOM::getDef('module_header_tags_robot_noindex_description');
     if (defined('MODULE_HEADER_TAGS_ROBOT_NOINDEX_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_ROBOT_NOINDEX_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_ROBOT_NOINDEX_STATUS == 'True';
     }
 }
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_google_analytics_title');
     $this->description = OSCOM::getDef('module_header_tags_google_analytics_description');
     if (defined('MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_STATUS == 'True';
     }
 }
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_manufacturers_seo_title');
     $this->description = OSCOM::getDef('module_header_tags_manufacturers_seo_description');
     if (defined('MODULE_HEADER_TAGS_MANUFACTURERS_SEO_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_MANUFACTURERS_SEO_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_MANUFACTURERS_SEO_STATUS == 'True';
     }
 }
示例#20
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_grid_list_view_title');
     $this->description = OSCOM::getDef('module_header_tags_grid_list_view_description');
     if (defined('MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_GRID_LIST_VIEW_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_GRID_LIST_VIEW_STATUS == 'True';
     }
 }
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_product_colorbox_title');
     $this->description = OSCOM::getDef('module_header_tags_product_colorbox_description');
     if (defined('MODULE_HEADER_TAGS_PRODUCT_COLORBOX_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_PRODUCT_COLORBOX_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_PRODUCT_COLORBOX_STATUS == 'True';
     }
 }
示例#22
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_opensearch_title');
     $this->description = OSCOM::getDef('module_header_tags_opensearch_description');
     if (defined('MODULE_HEADER_TAGS_OPENSEARCH_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_OPENSEARCH_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_OPENSEARCH_STATUS == 'True';
     }
 }
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_twitter_product_card_title');
     $this->description = OSCOM::getDef('module_header_tags_twitter_product_card_description');
     if (defined('MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_STATUS == 'True';
     }
 }
示例#24
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_gpublisher_title');
     $this->description = OSCOM::getDef('module_header_tags_gpublisher_description');
     if (defined('MODULE_HEADER_TAGS_GPUBLISHER_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_GPUBLISHER_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_GPUBLISHER_STATUS == 'True';
     }
 }
示例#25
0
 function process()
 {
     global $order, $currencies;
     if (MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
         $pass = false;
         switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
             case 'national':
                 if ($order->delivery['country_id'] == STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'international':
                 if ($order->delivery['country_id'] != STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'both':
                 $pass = true;
                 break;
             default:
                 $pass = false;
                 break;
         }
         if ($pass == true && $order->info['total'] - $order->info['shipping_cost'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
             $order->info['shipping_method'] = OSCOM::getDef('free_shipping_title');
             $order->info['total'] -= $order->info['shipping_cost'];
             $order->info['shipping_cost'] = 0;
         }
     }
     if (strpos($_SESSION['shipping']['id'], '\\') !== false) {
         list($vendor, $app, $module) = explode('\\', $_SESSION['shipping']['id']);
         list($module, $method) = explode('_', $module);
         $module = $vendor . '\\' . $app . '\\' . $module;
         $code = 'Shipping_' . str_replace('\\', '_', $module);
         if (Registry::exists($code)) {
             $OSCOM_SM = Registry::get($code);
         }
     } else {
         list($module, $method) = explode('_', $_SESSION['shipping']['id']);
         if (is_object($GLOBALS[$module])) {
             $OSCOM_SM = $GLOBALS[$module];
         }
     }
     if (tep_not_null($order->info['shipping_method'])) {
         if ($OSCOM_SM->tax_class > 0) {
             $shipping_tax = tep_get_tax_rate($OSCOM_SM->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
             $shipping_tax_description = tep_get_tax_description($OSCOM_SM->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
             $order->info['tax'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
             $order->info['tax_groups']["{$shipping_tax_description}"] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
             $order->info['total'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
             if (DISPLAY_PRICE_WITH_TAX == 'true') {
                 $order->info['shipping_cost'] += tep_calculate_tax($order->info['shipping_cost'], $shipping_tax);
             }
         }
         $this->output[] = array('title' => $order->info['shipping_method'] . ':', 'text' => $currencies->format($order->info['shipping_cost'], true, $order->info['currency'], $order->info['currency_value']), 'value' => $order->info['shipping_cost']);
     }
 }
示例#26
0
 public static function toLong($raw_datetime, $strict = true)
 {
     $result = '';
     $date = new DateTime($raw_datetime, true, $strict);
     if ($date->isValid()) {
         $result = strftime(OSCOM::getDef('date_format_long'), $date->getTimestamp());
     }
     return $result;
 }
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_table_click_jquery_title');
     $this->description = OSCOM::getDef('module_header_tags_table_click_jquery_description');
     if (defined('MODULE_HEADER_TAGS_TABLE_CLICK_JQUERY_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_TABLE_CLICK_JQUERY_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_TABLE_CLICK_JQUERY_STATUS == 'True';
     }
 }
示例#28
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_action_recorder_admin_login_title');
     $this->description = OSCOM::getDef('module_action_recorder_admin_login_description');
     if ($this->check()) {
         $this->minutes = (int) MODULE_ACTION_RECORDER_ADMIN_LOGIN_MINUTES;
         $this->attempts = (int) MODULE_ACTION_RECORDER_ADMIN_LOGIN_ATTEMPTS;
     }
 }
示例#29
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_action_recorder_reset_password_title');
     $this->description = OSCOM::getDef('module_action_recorder_reset_password_description');
     if ($this->check()) {
         $this->minutes = (int) MODULE_ACTION_RECORDER_RESET_PASSWORD_MINUTES;
         $this->attempts = (int) MODULE_ACTION_RECORDER_RESET_PASSWORD_ATTEMPTS;
     }
 }
示例#30
0
 function __construct()
 {
     $this->title = OSCOM::getDef('module_header_tags_canonical_title');
     $this->description = OSCOM::getDef('module_header_tags_canonical_description');
     if (defined('MODULE_HEADER_TAGS_CANONICAL_STATUS')) {
         $this->sort_order = MODULE_HEADER_TAGS_CANONICAL_SORT_ORDER;
         $this->enabled = MODULE_HEADER_TAGS_CANONICAL_STATUS == 'True';
     }
 }