function pre_confirmation_check() { global $oscTemplate, $order; parent::pre_confirmation_check(); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/BrandDetection.js"></script>', 'header_tags'); $oscTemplate->addBlock('<script type="text/javascript" src="ext/modules/payment/paymill/public/javascript/cc.js"></script>', 'header_tags'); $months_array = array(); $months_array[1] = array('01', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JANUARY); $months_array[2] = array('02', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_FEBRUARY); $months_array[3] = array('03', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_MARCH); $months_array[4] = array('04', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_APRIL); $months_array[5] = array('05', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_MAY); $months_array[6] = array('06', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JUNE); $months_array[7] = array('07', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_JULY); $months_array[8] = array('08', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_AUGUST); $months_array[9] = array('09', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_SEPTEMBER); $months_array[10] = array('10', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_OCTOBER); $months_array[11] = array('11', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_NOVEMBER); $months_array[12] = array('12', MODULE_PAYMENT_PAYMILL_CC_TEXT_MONTH_DECEMBER); $today = getdate(); $years_array = array(); for ($i = $today['year']; $i < $today['year'] + 10; $i++) { $years_array[$i] = array(tep_output_string(strftime('%Y', mktime(0, 0, 0, 1, 1, $i))), tep_output_string_protected(strftime('%Y', mktime(0, 0, 0, 1, 1, $i)))); } $this->fastCheckout->setFastCheckoutFlag($this->fastCheckoutFlag); $payment = $this->getPayment($_SESSION['customer_id']); $script = '<script type="text/javascript">' . 'var cclogging = "' . MODULE_PAYMENT_PAYMILL_CC_LOGGING . '";' . 'var cc_expiery_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_EXPIRY_INVALID . '";' . 'var cc_owner_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_OWNER_INVALID . '";' . 'var cc_card_number_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_CARDNUMBER_INVALID . '";' . 'var cc_cvc_number_invalid = "' . MODULE_PAYMENT_PAYMILL_CC_TEXT_CREDITCARD_CVC_INVALID . '";' . 'var brand = "' . $payment['card_type'] . '";' . 'var paymill_total = ' . json_encode($this->format_raw($order->info['total'])) . ';' . 'var paymill_currency = ' . json_encode(strtoupper($order->info['currency'])) . ';' . 'var paymill_cc_months = ' . json_encode($months_array) . ';' . 'var paymill_cc_years = ' . json_encode($years_array) . ';' . 'var paymill_cc_number_val = "' . $payment['last4'] . '";' . 'var paymill_cc_cvc_val = "' . $payment['cvc'] . '";' . 'var paymill_cc_card_type = "' . utf8_decode($payment['card_type']) . '";' . 'var paymill_cc_holder_val = "' . $payment['card_holder'] . '";' . 'var paymill_cc_expiry_month_val = "' . $payment['expire_month'] . '";' . 'var paymill_cc_expiry_year_val = "' . $payment['expire_year'] . '";' . 'var paymill_cc_fastcheckout = ' . ($this->fastCheckout->canCustomerFastCheckoutCc($_SESSION['customer_id']) ? 'true' : 'false') . ';' . 'var checkout_payment_link = "' . tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'step=step2', 'SSL', true, false) . '&payment_error=' . $this->code . '&error=";' . 'var logos = new Array();' . "logos['amex'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_AMEX) . ";" . "logos['carta-si'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_CARTASI) . ";" . "logos['dankort'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DANKORT) . ";" . "logos['carte-bleue'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_CARTEBLEUE) . ";" . "logos['discover'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DISCOVER) . ";" . "logos['diners-club'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_DINERSCLUB) . ";" . "logos['china-unionpay'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_UNIONPAY) . ";" . "logos['maestro'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_MAESTRO) . ";" . "logos['jcb'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_JCB) . ";" . "logos['mastercard'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_MASTERCARD) . ";" . "logos['visa'] = " . strtolower(MODULE_PAYMENT_PAYMILL_CC_VISA) . ";" . "var allBrandsDisabled = !logos['amex'] && !logos['carta-si'] && !logos['dankort'] && !logos['carte-bleue'] && !logos['discover'] && !logos['diners-club'] && !logos['china-unionpay'] && !logos['maestro'] && !logos['jcb'] && !logos['mastercard'] && !logos['visa'];" . '</script>'; $oscTemplate->addBlock($script, 'header_tags'); $oscTemplate->addBlock('<form id="paymill_form" action="' . tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL') . '" method="post"></form>', 'footer_scripts'); }
function execute() { global $PHP_SELF, $oscTemplate; $OSCOM_Db = Registry::get('Db'); if (tep_not_null(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID)) { if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_JS_PLACEMENT != 'Header') { $this->group = 'footer_scripts'; } $header = '<script> var _gaq = _gaq || []; _gaq.push([\'_setAccount\', \'' . tep_output_string(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID) . '\']); _gaq.push([\'_trackPageview\']);' . "\n"; if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True' && basename($PHP_SELF) == 'checkout_success.php' && isset($_SESSION['customer_id'])) { $Qorder = $OSCOM_Db->get('orders', ['orders_id', 'billing_city', 'billing_state', 'billing_country'], ['customers_id' => $_SESSION['customer_id']], 'date_purchased desc', 1); if ($Qorder->fetch() !== false) { $totals = array(); $Qtotals = $OSCOM_Db->get('orders_total', ['value', 'class'], ['orders_id' => $Qorder->valueInt('orders_id')]); while ($Qtotals->fetch()) { $totals[$Qtotals->value('class')] = $Qtotals->value('value'); } $header .= ' _gaq.push([\'_addTrans\', \'' . $Qorder->valueInt('orders_id') . '\', // order ID - required \'' . tep_output_string(STORE_NAME) . '\', // store name \'' . (isset($totals['ot_total']) ? $this->format_raw($totals['ot_total'], DEFAULT_CURRENCY) : 0) . '\', // total - required \'' . (isset($totals['ot_tax']) ? $this->format_raw($totals['ot_tax'], DEFAULT_CURRENCY) : 0) . '\', // tax \'' . (isset($totals['ot_shipping']) ? $this->format_raw($totals['ot_shipping'], DEFAULT_CURRENCY) : 0) . '\', // shipping \'' . $Qorder->valueProtected('billing_city') . '\', // city \'' . $Qorder->valueProtected('billing_state') . '\', // state or province \'' . $Qorder->valueProtected('billing_country') . '\' // country ]);' . "\n"; $Qproducts = $OSCOM_Db->prepare('select op.products_id, pd.products_name, op.final_price, op.products_quantity from :table_orders_products op, :table_products_description pd, :table_languages l where op.orders_id = :orders_id and op.products_id = pd.products_id and pd.language_id = l.languages_id and l.code = :code'); $Qproducts->bindInt(':orders_id', $Qorder->valueInt('orders_id')); $Qproducts->bindValue(':code', DEFAULT_LANGUAGE); $Qproducts->execute(); while ($Qproducts->fetch()) { $Qcategory = $OSCOM_Db->prepare('select cd.categories_name from :table_categories_description cd, :table_products_to_categories p2c, :table_languages l where p2c.products_id = :products_id and p2c.categories_id = cd.categories_id and cd.language_id = l.languages_id and l.code = :code'); $Qcategory->bindInt(':products_id', $Qproducts->valueInt('products_id')); $Qcategory->bindValue(':code', DEFAULT_LANGUAGE); $Qcategory->execute(); $header .= ' _gaq.push([\'_addItem\', \'' . $Qorder->valueInt('orders_id') . '\', // order ID - required \'' . $Qproducts->valueInt('products_id') . '\', // SKU/code - required \'' . $Qproducts->valueProtected('products_name') . '\', // product name \'' . $Qcategory->valueProtected('categories_name') . '\', // category \'' . $this->format_raw($Qproducts->value('final_price')) . '\', // unit price - required \'' . $Qproducts->valueInt('products_quantity') . '\' // quantity - required ]);' . "\n"; } $header .= ' _gaq.push([\'_trackTrans\']); //submits transaction to the Analytics servers' . "\n"; } } $header .= ' (function() { var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })(); </script>' . "\n"; $oscTemplate->addBlock($header, $this->group); } }
function execute() { global $oscTemplate; if (defined('META_SEO_TITLE') && strlen(META_SEO_TITLE) > 0) { $oscTemplate->setTitle(tep_output_string(META_SEO_TITLE) . ', ' . $oscTemplate->getTitle()); } }
function osc_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) { if (!tep_not_null($page)) { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>'); } if ($connection == 'NONSSL') { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } elseif ($connection == 'SSL') { if (ENABLE_SSL == true) { $link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG; } else { $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG; } } else { die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>'); } if (tep_not_null($parameters)) { $link .= $page . '?' . tep_output_string($parameters); $separator = '&'; } else { $link .= $page; $separator = '?'; } while (substr($link, -1) == '&' || substr($link, -1) == '?') { $link = substr($link, 0, -1); } // Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined if ($add_session_id == true && usu::$session_started == true && SESSION_FORCE_COOKIE_USE == 'False') { if (tep_not_null(usu::$sid)) { $_sid = usu::$sid; } elseif (usu::$request_type == 'NONSSL' && $connection == 'SSL' && ENABLE_SSL == true || usu::$request_type == 'SSL' && $connection == 'NONSSL') { if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) { $_sid = tep_session_name() . '=' . tep_session_id(); } } } //commented out SEARCH_ENGINE_FRIENDLY_URLS since removed from oscmax 2.1 sql file /* if ( ( SEARCH_ENGINE_FRIENDLY_URLS == 'true' ) && ( $search_engine_safe == true ) ) { while ( strstr( $link, '&&' ) ) $link = str_replace( '&&', '&', $link ); $link = str_replace( '?', '/', $link ); $link = str_replace( '&', '/', $link ); $link = str_replace( '=', '/', $link ); $separator = '?'; } */ if (isset($_sid)) { $link .= $separator . tep_output_string($_sid); } usu::$performance['std_url_array'][] = $link; if (defined('SEO_URLS_USE_W3C_VALID') && SEO_URLS_USE_W3C_VALID == 'true') { return htmlspecialchars(utf8_encode($link)); } return $link; }
function execute() { global $oscTemplate; if (defined('META_SEO_DESCRIPTION') && strlen(META_SEO_DESCRIPTION) > 0) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string(META_SEO_DESCRIPTION) . '" />', $this->group); } if (defined('META_SEO_KEYWORDS') && strlen(META_SEO_KEYWORDS) > 0) { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string(META_SEO_KEYWORDS) . '" />', $this->group); } }
function execute() { global $PHP_SELF, $oscTemplate, $customer_id; if (tep_not_null(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID)) { if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_JS_PLACEMENT != 'Header') { $this->group = 'footer_scripts'; } $header = '<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push([\'_setAccount\', \'' . tep_output_string(MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_ID) . '\']); _gaq.push([\'_trackPageview\']);' . "\n"; if (MODULE_HEADER_TAGS_GOOGLE_ANALYTICS_EC_TRACKING == 'True' && basename($PHP_SELF) == FILENAME_CHECKOUT_SUCCESS && tep_session_is_registered('customer_id')) { $order_query = tep_db_query("select orders_id, billing_city, billing_state, billing_country from " . TABLE_ORDERS . " where customers_id = '" . (int) $customer_id . "' order by date_purchased desc limit 1"); if (tep_db_num_rows($order_query) == 1) { $order = tep_db_fetch_array($order_query); $totals = array(); $order_totals_query = tep_db_query("select value, class from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $order['orders_id'] . "'"); while ($order_totals = tep_db_fetch_array($order_totals_query)) { $totals[$order_totals['class']] = $order_totals['value']; } $header .= ' _gaq.push([\'_addTrans\', \'' . (int) $order['orders_id'] . '\', // order ID - required \'' . tep_output_string(STORE_NAME) . '\', // store name \'' . (isset($totals['ot_total']) ? $this->format_raw($totals['ot_total'], DEFAULT_CURRENCY) : 0) . '\', // total - required \'' . (isset($totals['ot_tax']) ? $this->format_raw($totals['ot_tax'], DEFAULT_CURRENCY) : 0) . '\', // tax \'' . (isset($totals['ot_shipping']) ? $this->format_raw($totals['ot_shipping'], DEFAULT_CURRENCY) : 0) . '\', // shipping \'' . tep_output_string_protected($order['billing_city']) . '\', // city \'' . tep_output_string_protected($order['billing_state']) . '\', // state or province \'' . tep_output_string_protected($order['billing_country']) . '\' // country ]);' . "\n"; $order_products_query = tep_db_query("select op.products_id, pd.products_name, op.final_price, op.products_quantity from " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_LANGUAGES . " l where op.orders_id = '" . (int) $order['orders_id'] . "' and op.products_id = pd.products_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = pd.language_id"); while ($order_products = tep_db_fetch_array($order_products_query)) { $category_query = tep_db_query("select cd.categories_name from " . TABLE_CATEGORIES_DESCRIPTION . " cd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_LANGUAGES . " l where p2c.products_id = '" . (int) $order_products['products_id'] . "' and p2c.categories_id = cd.categories_id and l.code = '" . tep_db_input(DEFAULT_LANGUAGE) . "' and l.languages_id = cd.language_id limit 1"); $category = tep_db_fetch_array($category_query); $header .= ' _gaq.push([\'_addItem\', \'' . (int) $order['orders_id'] . '\', // order ID - required \'' . (int) $order_products['products_id'] . '\', // SKU/code - required \'' . tep_output_string($order_products['products_name']) . '\', // product name \'' . tep_output_string($category['categories_name']) . '\', // category \'' . $this->format_raw($order_products['final_price']) . '\', // unit price - required \'' . (int) $order_products['products_quantity'] . '\' // quantity - required ]);' . "\n"; } $header .= ' _gaq.push([\'_trackTrans\']); //submits transaction to the Analytics servers' . "\n"; } } $header .= ' (function() { var ga = document.createElement(\'script\'); ga.type = \'text/javascript\'; ga.async = true; ga.src = (\'https:\' == document.location.protocol ? \'https://ssl\' : \'http://www\') + \'.google-analytics.com/ga.js\'; var s = document.getElementsByTagName(\'script\')[0]; s.parentNode.insertBefore(ga, s); })(); </script>' . "\n"; $oscTemplate->addBlock($header, $this->group); } }
function outputPlain($class) { $message = false; for ($i = 0, $n = sizeof($this->messages); $i < $n; $i++) { if ($this->messages[$i]['class'] == $class) { $message = tep_output_string($this->messages[$i]['message']); break; } } return $message; }
function execute() { global $oscTemplate; if (defined('META_SEO_TITLE') && strlen(META_SEO_TITLE) > 0) { $oscTemplate->setTitle(tep_output_string(META_SEO_TITLE) . MODULE_HEADER_TAGS_PAGES_SEO_SEPARATOR . $oscTemplate->getTitle()); } if (defined('META_SEO_DESCRIPTION') && strlen(META_SEO_DESCRIPTION) > 0) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string(META_SEO_DESCRIPTION) . '" />' . "\n", $this->group); } if (defined('META_SEO_KEYWORDS') && strlen(META_SEO_KEYWORDS) > 0) { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string(META_SEO_KEYWORDS) . '" />' . "\n", $this->group); } }
function execute() { global $PHP_SELF, $oscTemplate, $categories, $current_category_id, $languages_id; if (basename($PHP_SELF) == 'index.php' && $current_category_id > 0) { $meta_info_query = tep_db_query("select categories_seo_description, categories_seo_keywords from categories_description where categories_id = '" . (int) $current_category_id . "' and language_id = '" . (int) $languages_id . "'"); $meta_info = tep_db_fetch_array($meta_info_query); if (tep_not_null($meta_info['categories_seo_description'])) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($meta_info['categories_seo_description']) . '" />' . PHP_EOL, $this->group); } if (tep_not_null($meta_info['categories_seo_keywords']) && MODULE_HEADER_TAGS_CATEGORY_SEO_KEYWORDS_STATUS == 'True') { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($meta_info['categories_seo_keywords']) . '" />' . PHP_EOL, $this->group); } } }
function execute() { global $PHP_SELF, $oscTemplate, $manufacturers, $languages_id; if (basename($PHP_SELF) == 'index.php') { if (isset($_GET['manufacturers_id']) && is_numeric($_GET['manufacturers_id'])) { $meta_info_query = tep_db_query("select manufacturers_seo_description, manufacturers_seo_keywords from manufacturers_info where manufacturers_id = '" . (int) $_GET['manufacturers_id'] . "' and languages_id = '" . (int) $languages_id . "'"); $meta_info = tep_db_fetch_array($meta_info_query); if (tep_not_null($meta_info['manufacturers_seo_description'])) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($meta_info['manufacturers_seo_description']) . '" />' . PHP_EOL, $this->group); } if (tep_not_null($meta_info['manufacturers_seo_keywords']) && MODULE_HEADER_TAGS_MANUFACTURERS_SEO_KEYWORDS_STATUS == 'True') { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($meta_info['manufacturers_seo_keywords']) . '" />' . PHP_EOL, $this->group); } } } }
function execute() { global $PHP_SELF, $oscTemplate, $languages_id, $product_check; if (isset($_GET['products_id'])) { if ($product_check['total'] > 0) { $meta_info_query = tep_db_query("select pd.products_seo_description, pd.products_seo_keywords from products p, products_description pd where p.products_status = '1' and p.products_id = '" . (int) $_GET['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int) $languages_id . "'"); $meta_info = tep_db_fetch_array($meta_info_query); if (tep_not_null($meta_info['products_seo_description'])) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($meta_info['products_seo_description']) . '" />' . PHP_EOL, $this->group); } if (tep_not_null($meta_info['products_seo_keywords']) && MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Search') { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($meta_info['products_seo_keywords']) . '" />' . PHP_EOL, $this->group); } } } }
function execute() { global $PHP_SELF, $oscTemplate, $categories, $current_category_id, $languages_id; if (basename($PHP_SELF) == FILENAME_DEFAULT) { if ($current_category_id > 0) { $meta_info_query = tep_db_query("select cd.categories_seo_description, cd.categories_seo_keywords from " . TABLE_CATEGORIES_DESCRIPTION . " cd where cd.categories_id = '" . (int) $current_category_id . "' and cd.language_id = '" . (int) $languages_id . "'"); $meta_info = tep_db_fetch_array($meta_info_query); if (tep_not_null($meta_info['categories_seo_description'])) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($meta_info['categories_seo_description']) . '" />' . "\n", $this->group); } if (tep_not_null($meta_info['categories_seo_keywords']) && MODULE_HEADER_TAGS_CATEGORY_META_KEYWORDS_STATUS == 'True') { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($meta_info['categories_seo_keywords']) . '" />' . "\n", $this->group); } } } }
function execute() { global $PHP_SELF, $oscTemplate, $HTTP_GET_VARS, $languages_id, $product_check; $meta_show = ''; if (basename($PHP_SELF) == FILENAME_PRODUCT_INFO) { if (isset($HTTP_GET_VARS['products_id'])) { if ($product_check['total'] > 0) { $meta_info_query = tep_db_query("select pd.products_seo_description, pd.products_seo_keywords from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int) $languages_id . "'"); $meta_info = tep_db_fetch_array($meta_info_query); if (tep_not_null($meta_info['products_seo_description'])) { $oscTemplate->addBlock('<meta name="description" content="' . tep_output_string($meta_info['products_seo_description']) . '" />', $this->group); } if (tep_not_null($meta_info['products_seo_keywords']) && MODULE_HEADER_TAGS_PRODUCT_META_KEYWORDS_STATUS != 'Search') { $oscTemplate->addBlock('<meta name="keywords" content="' . tep_output_string($meta_info['products_seo_keywords']) . '" />' . "\n", $this->group); } } } } }
function getOutput() { $days = array(); for ($i = 0; $i < 30; $i++) { $days[date('Y-m-d', strtotime('-' . $i . ' days'))] = 0; } $orders_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as dateday, sum(ot.value) as total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot where date_sub(curdate(), interval 30 day) <= o.date_purchased and o.orders_id = ot.orders_id and ot.class = 'ot_total' group by dateday"); while ($orders = tep_db_fetch_array($orders_query)) { $days[$orders['dateday']] = $orders['total']; } $days = array_reverse($days, true); $js_array = ''; foreach ($days as $date => $total) { $js_array .= '[' . mktime(0, 0, 0, substr($date, 5, 2), substr($date, 8, 2), substr($date, 0, 4)) * 1000 . ', ' . $total . '],'; } if (!empty($js_array)) { $js_array = substr($js_array, 0, -1); } $output = '<div id="d_total_revenue" style="width: 100%; height: 150px;"></div>' . '<script language="javascript" type="text/javascript">' . '$(function () {' . ' var plot30 = [' . $js_array . '];' . ' $.plot($("#d_total_revenue"), [ {' . ' label: "' . tep_output_string(MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_CHART_LINK) . '",' . ' data: plot30,' . ' lines: { show: true, fill: true },' . ' color: "#66CC33"' . ' }], {' . ' xaxis: {' . ' ticks: 4,' . ' mode: "time"' . ' },' . ' yaxis: {' . ' ticks: 3,' . ' min: 0' . ' },' . ' grid: {' . ' backgroundColor: { colors: ["#fff", "#eee"] }' . ' },' . ' legend: {' . ' labelFormatter: function(label, series) {' . ' return \'<a href="' . tep_href_link(FILENAME_ORDERS) . '">\' + label + \'</a>\';' . ' }' . ' }' . ' });' . '});' . '</script>'; return $output; }
function tep_output_string_protected($string) { return tep_output_string($string, false, true); }
function tep_draw_pull_down_menu($name, $values, $default = '', $parameters = '', $required = false) { $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) { $field .= ' ' . $parameters; } $field .= '>'; if (empty($default) && isset($GLOBALS[$name])) { $default = stripslashes($GLOBALS[$name]); } for ($i = 0, $n = sizeof($values); $i < $n; $i++) { $field .= '<option value="' . tep_output_string($values[$i]['id']) . '"'; if ($default == $values[$i]['id']) { $field .= ' SELECTED'; } $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>'; } $field .= '</select>'; if ($required == true) { $field .= TEXT_FIELD_REQUIRED; } return $field; }
?> <tr> <td ><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main" ><b><?php echo tep_output_string_protected($error['title']); ?></b></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBoxNotice"> <tr class="infoBoxNoticeContents"> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><?php echo tep_draw_separator('clear.gif', '10', '1'); ?></td> <td class="main" width="100%" valign="top"><?php echo tep_output_string($error['error']); ?></td> <td><?php echo tep_draw_separator('clear.gif', '10', '1'); ?></td> </tr> </table></td> </tr> </table></td> </tr> <tr> <td><?php echo tep_draw_separator('clear.gif', '100%', '10'); ?></td> </tr> </table> <?php } ?> <table class="infoBox" width="80%" cellspacing="0" cellpadding="2" align=center>
function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null) { static $button_counter = 1; $types = array('submit', 'button', 'reset'); if (!isset($params['type'])) { $params['type'] = 'submit'; } if (!in_array($params['type'], $types)) { $params['type'] = 'submit'; } if ($params['type'] == 'submit' && isset($link)) { $params['type'] = 'button'; } if (!isset($priority)) { $priority = 'secondary'; } $button = '<span class="tdbLink">'; if ($params['type'] == 'button' && isset($link)) { $button .= '<a id="tdb' . $button_counter . '" href="' . $link . '"'; if (isset($params['newwindow'])) { $button .= ' target="_blank"'; } } else { $button .= '<button id="tdb' . $button_counter . '" type="' . tep_output_string($params['type']) . '"'; } if (isset($params['params'])) { $button .= ' ' . $params['params']; } $button .= '>' . $title; if ($params['type'] == 'button' && isset($link)) { $button .= '</a>'; } else { $button .= '</button>'; } $button .= '</span><script type="text/javascript">$("#tdb' . $button_counter . '").button('; $args = array(); if (isset($icon)) { if (!isset($params['iconpos'])) { $params['iconpos'] = 'left'; } if ($params['iconpos'] == 'left') { $args[] = 'icons:{primary:"ui-icon-' . $icon . '"}'; } else { $args[] = 'icons:{secondary:"ui-icon-' . $icon . '"}'; } } if (empty($title)) { $args[] = 'text:false'; } if (!empty($args)) { $button .= '{' . implode(',', $args) . '}'; } $button .= ').addClass("ui-priority-' . $priority . '").parent().removeClass("tdbLink");</script>'; $button_counter++; return $button; }
function getOutput() { $days = array(); for ($i = 0; $i < 30; $i++) { $days[date('Y-m-d', strtotime('-' . $i . ' days'))] = 0; } $orders_query = tep_db_query("select date_format(o.date_purchased, '%Y-%m-%d') as dateday, sum(ot.value) as total from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot where date_sub(curdate(), interval 30 day) <= o.date_purchased and o.orders_id = ot.orders_id and ot.class = 'ot_total' group by dateday"); while ($orders = tep_db_fetch_array($orders_query)) { $days[$orders['dateday']] = $orders['total']; } $days = array_reverse($days, true); $js_array = ''; foreach ($days as $date => $total) { $js_array .= '[' . mktime(0, 0, 0, substr($date, 5, 2), substr($date, 8, 2), substr($date, 0, 4)) * 1000 . ', ' . $total . '],'; } if (!empty($js_array)) { $js_array = substr($js_array, 0, -1); } $chart_label = tep_output_string(MODULE_ADMIN_DASHBOARD_TOTAL_REVENUE_CHART_LINK); $chart_label_link = tep_href_link(FILENAME_ORDERS); $output = <<<EOD <div id="d_total_revenue" style="width: 100%; height: 150px;"></div> <script type="text/javascript"> \$(function () { var plot30 = [{$js_array}]; \$.plot(\$('#d_total_revenue'), [ { label: '{$chart_label}', data: plot30, lines: { show: true, fill: true }, points: { show: true }, color: '#66CC33' }], { xaxis: { ticks: 4, mode: 'time' }, yaxis: { ticks: 3, min: 0 }, grid: { backgroundColor: { colors: ['#fff', '#eee'] }, hoverable: true }, legend: { labelFormatter: function(label, series) { return '<a href="{$chart_label_link}">' + label + '</a>'; } } }); }); function showTooltip(x, y, contents) { \$('<div id="tooltip">' + contents + '</div>').css( { position: 'absolute', display: 'none', top: y + 5, left: x + 5, border: '1px solid #fdd', padding: '2px', backgroundColor: '#fee', opacity: 0.80 }).appendTo('body').fadeIn(200); } var monthNames = [ 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ]; var previousPoint = null; \$('#d_total_revenue').bind('plothover', function (event, pos, item) { if (item) { if (previousPoint != item.datapoint) { previousPoint = item.datapoint; \$('#tooltip').remove(); var x = item.datapoint[0], y = item.datapoint[1], xdate = new Date(x); showTooltip(item.pageX, item.pageY, y + ' for ' + monthNames[xdate.getMonth()] + '-' + xdate.getDate()); } } else { \$('#tooltip').remove(); previousPoint = null; } }); </script> EOD; return $output; }
function execute() { global $oscTemplate; $oscTemplate->addHeaderTag('<link rel="search" type="application/opensearchdescription+xml" href="' . tep_href_link('opensearch.php', '', 'NONSSL', false) . '" title="' . tep_output_string(STORE_NAME) . '" />'); }
function tep_draw_pull_down_menu($name, $values, $def = '', $parameters = '', $required = false) { $default = array(); if (empty($def) && isset($GLOBALS[$name])) { $def = stripslashes($GLOBALS[$name]); } if (!is_array($def)) { $default[0] = $def; } else { $default = $def; } $field = '<select name="' . tep_output_string($name) . '"'; if (tep_not_null($parameters)) { $field .= ' ' . $parameters; } $field .= '>'; reset($values); while (list(, $value) = each($values)) { if (!isset($value['active'])) { $value['active'] = '1'; } if (tep_not_null($value['id']) || tep_not_null($value['text'])) { if ($value['active'] == '0') { $field .= '<optgroup label="' . tep_output_string($value['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '"' . (tep_not_null($value['params']) ? ' ' . $value['params'] : '') . '></optgroup>' . "\n"; } else { $field .= '<option value="' . tep_output_string($value['id']) . '"'; if (in_array($value['id'], $default)) { $field .= ' selected="selected"'; } $field .= (tep_not_null($value['params']) ? ' ' . $value['params'] : '') . '>' . tep_output_string($value['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>' . "\n"; } } } $field .= '</select>'; if ($required == true) { $field .= TEXT_FIELD_REQUIRED; } return $field; }
function tableBox($contents, $direct_output = false) { $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"'; if (tep_not_null($this->table_parameters)) { $tableBox_string .= ' ' . $this->table_parameters; } $tableBox_string .= '>' . "\n"; for ($i = 0, $n = sizeof($contents); $i < $n; $i++) { if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) { $tableBox_string .= $contents[$i]['form'] . "\n"; } $tableBox_string .= ' <tr'; if (tep_not_null($this->table_row_parameters)) { $tableBox_string .= ' ' . $this->table_row_parameters; } if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) { $tableBox_string .= ' ' . $contents[$i]['params']; } $tableBox_string .= '>' . "\n"; if (isset($contents[$i][0]) && is_array($contents[$i][0])) { for ($x = 0, $n2 = sizeof($contents[$i]); $x < $n2; $x++) { if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) { $tableBox_string .= ' <td'; if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) { $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"'; } if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) { $tableBox_string .= ' ' . $contents[$i][$x]['params']; } elseif (tep_not_null($this->table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } $tableBox_string .= '>'; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) { $tableBox_string .= $contents[$i][$x]['form']; } $tableBox_string .= $contents[$i][$x]['text']; if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) { $tableBox_string .= '</form>'; } $tableBox_string .= '</td>' . "\n"; } } } else { $tableBox_string .= ' <td'; if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) { $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"'; } if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) { $tableBox_string .= ' ' . $contents[$i]['params']; } elseif (tep_not_null($this->table_data_parameters)) { $tableBox_string .= ' ' . $this->table_data_parameters; } $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n"; } $tableBox_string .= ' </tr>' . "\n"; if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) { $tableBox_string .= '</form>' . "\n"; } } $tableBox_string .= '</table>' . "\n"; if ($direct_output == true) { echo $tableBox_string; } return $tableBox_string; }
function tep_image_source($src, $width = '', $height = '', $usedefaultsize = false) { // if no file exists display the 'no image' file if (!is_file($src)) { $src = "images/no_image.jpg"; } // Set default image variable and code $image_source = $src; // Don't calculate if the image is set to a "%" width if (strstr($width, '%') == false || strstr($height, '%') == false) { $dont_calculate = 0; } else { $dont_calculate = 1; } // Dont calculate if a pixel image is being passed (hope you dont have pixels for sale) if (!strstr($image, 'pixel')) { $dont_calculate = 0; } else { $dont_calculate = 1; } // Do we calculate the image size? if (CONFIG_CALCULATE_IMAGE_SIZE && !$dont_calculate) { if (!$usedefaultsize) { // not use default size, do image caculate // Get the image's information if ($image_size = @getimagesize($src)) { $ratio = $image_size[1] / $image_size[0]; // Set the width and height to the proper ratio if (!$width && $height) { $ratio = $height / $image_size[1]; $width = intval($image_size[0] * $ratio); } elseif ($width && !$height) { $ratio = $width / $image_size[0]; $height = intval($image_size[1] * $ratio); } elseif (!$width && !$height) { $width = $image_size[0]; $height = $image_size[1]; } // Scale the image if not the original size if ($image_size[0] != $width || $image_size[1] != $height) { $rx = $image_size[0] / $width; $ry = $image_size[1] / $height; if ($rx < $ry) { $width = intval($height / $ratio); } else { $height = intval($width * $ratio); } $image_source = get_html_link('imagethumb.php', 'img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height)); } } elseif (IMAGE_REQUIRED == 'false') { return ''; } } else { $image_source = get_html_link('imagethumb.php', 'img=' . $src . '&w=' . tep_output_string($width) . '&h=' . tep_output_string($height)); } } return $image_source; }
function tep_create_sort_heading($sortby, $colnum, $heading) { global $PHP_SELF; $sort_prefix = ''; $sort_suffix = ''; if ($sortby) { $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">'; $sort_suffix = ' ' . (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? tep_image(DIR_WS_ICONS . 'down_off.png') : tep_image(DIR_WS_ICONS . 'up_off.png') : '') . '</a>'; } return $sort_prefix . $heading . $sort_suffix; }
Copyright (c) 2003 BPAS New Zealand Limited Released under the GNU General Public License */ ?> <!-- new products //--> <tr> <td><span id="whatsnew_box"> <?php $rp_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, left(pd.products_name,50) as products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where products_status = '1' and p.products_id not in (select products_id from " . TABLE_SPECIALS . " where status = 1) and p.products_id not in (select products_id from products_to_categories where categories_id=21 or categories_id=23) and pd.language_id = '" . (int) $languages_id . "' order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS); if (tep_db_num_rows($rp_query)) { $i = 0; $pausecontent_np = '<ul id="whatsnew_list" class="carousel">'; while ($random_product = tep_db_fetch_array($rp_query)) { $pausecontent_np .= "<li><a class='remote' href='" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product["products_id"]) . "'>" . tep_image(DIR_WS_IMAGES . $random_product['products_image'], tep_output_string($random_product['products_name'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>', '&' => '&')), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . "</a><br/><a class='remote' href='" . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . "'>" . tep_output_string($random_product['products_name'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>', '&' => '&')) . "</a><br/>"; if (intval($random_product['specials_new_products_price']) > 0) { $pausecontent_np .= "<s>" . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . "</s><br/><span class='productSpecialPrice'>" . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . "</span></li>"; } else { $pausecontent_np .= $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . "<br/></li>"; } $i++; } $pausecontent_np .= "</ul>"; } ?> <?php $info_box_contents = array(); $info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW); new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));
function tep_create_sort_heading($sortby, $colnum, $heading) { global $PHP_SELF; $sort_prefix = ''; $sort_suffix = ''; if ($sortby) { $sort_prefix = '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('info', 'sort')) . 'sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">'; $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '+' : '-' : '') . '</a>'; } return $sort_prefix . $heading . $sort_suffix; }
function tep_create_sort_heading($sortby, $colnum, $heading, $smaller = false) { global $_SERVER; $sort_prefix = ''; $sort_suffix = ''; /*if ($sortby) {*/ $sort_prefix = '<a href="' . tep_href_link(basename($_SERVER['PHP_SELF']), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? Translate('Oplopend') : Translate('Afdalend')) . ' ' . Translate('sorteren') . ' ' . Translate('op') . ' ' . $heading) . '" class="productListing-heading">'; $sort_suffix = (substr($sortby, 0, 1) == $colnum ? substr($sortby, 1, 1) == 'a' ? '<div class="sort_arrow down"></div>' : '<div class="sort_arrow up"></div>' : '<div class="sort_arrow default"></div>') . '</a>'; /*}*/ if ($smaller) { if (strlen($heading) > 10) { $heading = '<span style="font-size: 10px;">' . $heading . '</span>'; } } return $sort_prefix . $heading . $sort_suffix; }
function tep_draw_button($title = null, $icon = null, $link = null, $priority = null, $params = null, $style = null) { static $button_counter = 1; $types = array('submit', 'button', 'reset'); if (!isset($params['type'])) { $params['type'] = 'submit'; } if (!in_array($params['type'], $types)) { $params['type'] = 'submit'; } if ($params['type'] == 'submit' && isset($link)) { $params['type'] = 'button'; } if (!isset($priority)) { $priority = 'secondary'; } $button = NULL; if ($params['type'] == 'button' && isset($link)) { $button .= '<a id="btn' . $button_counter . '" href="' . $link . '"'; if (isset($params['newwindow'])) { $button .= ' target="_blank"'; } } else { $button .= '<button '; $button .= ' type="' . tep_output_string($params['type']) . '"'; } if (isset($params['params'])) { $button .= ' ' . $params['params']; } $button .= ' class="btn '; $button .= isset($style) ? $style : 'btn-default'; $button .= '">'; if (isset($icon) && tep_not_null($icon)) { $button .= ' <span class="' . $icon . '"></span> '; } $button .= $title; if ($params['type'] == 'button' && isset($link)) { $button .= '</a>'; } else { $button .= '</button>'; } $button_counter++; return $button; }
function confirmation() { global $customer_id, $order, $currencies; $months_array = array(); for ($i = 1; $i < 13; $i++) { $months_array[] = array('id' => tep_output_string(sprintf('%02d', $i)), 'text' => tep_output_string_protected(sprintf('%02d', $i))); } $today = getdate(); $years_array = array(); for ($i = $today['year']; $i < $today['year'] + 10; $i++) { $years_array[] = array('id' => tep_output_string(strftime('%Y', mktime(0, 0, 0, 1, 1, $i))), 'text' => tep_output_string_protected(strftime('%Y', mktime(0, 0, 0, 1, 1, $i)))); } $months_string = '<select data-stripe="exp_month">'; foreach ($months_array as $m) { $months_string .= '<option value="' . tep_output_string($m['id']) . '">' . tep_output_string($m['text']) . '</option>'; } $months_string .= '</select>'; $years_string = '<select data-stripe="exp_year">'; foreach ($years_array as $y) { $years_string .= '<option value="' . tep_output_string($y['id']) . '">' . tep_output_string($y['text']) . '</option>'; } $years_string .= '</select>'; $content = ''; if (MODULE_PAYMENT_STRIPE_TOKENS == 'True') { $tokens_query = tep_db_query("select id, card_type, number_filtered, expiry_date from customers_stripe_tokens where customers_id = '" . (int) $customer_id . "' order by date_added"); if (tep_db_num_rows($tokens_query) > 0) { $content .= '<table id="stripe_table" border="0" width="100%" cellspacing="0" cellpadding="2">'; while ($tokens = tep_db_fetch_array($tokens_query)) { $content .= '<tr class="moduleRow" id="stripe_card_' . (int) $tokens['id'] . '">' . ' <td width="40" valign="top"><input type="radio" name="stripe_card" value="' . (int) $tokens['id'] . '" /></td>' . ' <td valign="top"><strong>' . tep_output_string_protected($tokens['card_type']) . '</strong> ****' . tep_output_string_protected($tokens['number_filtered']) . ' ' . tep_output_string_protected(substr($tokens['expiry_date'], 0, 2) . '/' . substr($tokens['expiry_date'], 2)) . '</td>' . '</tr>'; } $content .= '<tr class="moduleRow" id="stripe_card_0">' . ' <td width="40" valign="top"><input type="radio" name="stripe_card" value="0" /></td>' . ' <td valign="top">' . MODULE_PAYMENT_STRIPE_CREDITCARD_NEW . '</td>' . '</tr>' . '</table>'; } } $content .= '<div class="messageStackError payment-errors"></div>' . '<table id="stripe_table_new_card" border="0" width="100%" cellspacing="0" cellpadding="2">' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_STRIPE_CREDITCARD_OWNER . '</td>' . ' <td><input type="text" data-stripe="name" value="' . tep_output_string($order->billing['firstname'] . ' ' . $order->billing['lastname']) . '" /></td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_STRIPE_CREDITCARD_NUMBER . '</td>' . ' <td><input type="text" maxlength="20" autocomplete="off" data-stripe="number" /></td>' . '</tr>' . '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_STRIPE_CREDITCARD_EXPIRY . '</td>' . ' <td>' . $months_string . ' / ' . $years_string . '</td>' . '</tr>'; if (MODULE_PAYMENT_STRIPE_VERIFY_WITH_CVC == 'True') { $content .= '<tr>' . ' <td width="30%">' . MODULE_PAYMENT_STRIPE_CREDITCARD_CVC . '</td>' . ' <td><input type="text" size="5" maxlength="4" autocomplete="off" data-stripe="cvc" /></td>' . '</tr>'; } if (MODULE_PAYMENT_STRIPE_TOKENS == 'True') { $content .= '<tr>' . ' <td width="30%"> </td>' . ' <td>' . tep_draw_checkbox_field('cc_save', 'true') . ' ' . MODULE_PAYMENT_STRIPE_CREDITCARD_SAVE . '</td>' . '</tr>'; } $content .= '</table>'; $address = array('address_line1' => $order->billing['street_address'], 'address_city' => $order->billing['city'], 'address_zip' => $order->billing['postcode'], 'address_state' => tep_get_zone_name($order->billing['country_id'], $order->billing['zone_id'], $order->billing['state']), 'address_country' => $order->billing['country']['iso_code_2']); foreach ($address as $k => $v) { $content .= '<input type="hidden" data-stripe="' . tep_output_string($k) . '" value="' . tep_output_string($v) . '" />'; } if (!$this->templateClassExists()) { $content .= $this->getSubmitCardDetailsJavascript(); } $confirmation = array('title' => $content); return $confirmation; }
<div class="row"> <?php echo $oscTemplate->getContent('product_info'); ?> </div> <?php if (USE_CACHE == 'true' && empty($SID)) { echo tep_cache_also_purchased(3600); } else { include DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS; } if ($product_info['manufacturers_id'] > 0) { $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int) $product_info['manufacturers_id'] . "'"); if (tep_db_num_rows($manufacturer_query)) { $manufacturer = tep_db_fetch_array($manufacturer_query); echo '<span itemprop="manufacturer" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="' . tep_output_string($manufacturer['manufacturers_name']) . '" /></span>'; } } ?> </div> </div> </form> <?php } require DIR_WS_INCLUDES . 'template_bottom.php'; require DIR_WS_INCLUDES . 'application_bottom.php';