本文整理汇总了PHP中tep_get_all_get_params函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_get_all_get_params函数的具体用法?PHP tep_get_all_get_params怎么用?PHP tep_get_all_get_params使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_get_all_get_params函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
if (tep_session_is_registered('customer_id')) {
// retreive the last x products purchased
$orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
if (tep_db_num_rows($orders_query)) {
$product_ids = '';
while ($orders = tep_db_fetch_array($orders_query)) {
$product_ids .= (int) $orders['products_id'] . ',';
}
$product_ids = substr($product_ids, 0, -1);
$customer_orders_string = '<ul class="list-unstyled">';
$products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
$customer_orders_string .= '<li><span class="pull-right"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '"><span class="glyphicon glyphicon-shopping-cart"></span></a></span><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></li>';
}
$customer_orders_string .= '</ul>';
if ($this->group == 'boxes_footer') {
$data = '<div class="col-sm-3 col-lg-2">' . ' <div class="footerbox order-history">' . ' <h2>' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</h2>';
} else {
$data = '<div class="panel panel-default">' . ' <div class="panel-heading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</div>';
}
$data .= ' <div class="panel-body">' . $customer_orders_string . '</div>';
$data .= '</div>';
if ($this->group == 'boxes_footer') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:32,代码来源:bm_order_history.php
示例2: execute
function execute()
{
global $PHP_SELF, $oscTemplate;
$OSCOM_Db = Registry::get('Db');
$OSCOM_Language = Registry::get('Language');
if (isset($_SESSION['customer_id'])) {
// retreive the last x products purchased
$Qorders = $OSCOM_Db->prepare('select distinct op.products_id from :table_orders o, :table_orders_products op, :table_products p where o.customers_id = :customers_id and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = 1 group by op.products_id order by o.date_purchased desc limit :limit');
$Qorders->bindInt(':customers_id', $_SESSION['customer_id']);
$Qorders->bindInt(':limit', MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
$Qorders->execute();
if ($Qorders->fetch() !== false) {
$product_ids = [];
do {
$product_ids[] = $Qorders->valueInt('products_id');
} while ($Qorders->fetch());
$customer_orders_string = null;
$Qproducts = $OSCOM_Db->prepare('select products_id, products_name from :table_products_description where products_id in (' . implode(', ', $product_ids) . ') and language_id = :language_id order by products_name');
$Qproducts->bindInt(':language_id', $OSCOM_Language->getId());
$Qproducts->execute();
while ($Qproducts->fetch()) {
$customer_orders_string .= '<li><span class="pull-right"><a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $Qproducts->valueInt('products_id')) . '"><span class="fa fa-shopping-cart"></span></a></span><a href="' . OSCOM::link('product_info.php', 'products_id=' . $Qproducts->valueInt('products_id')) . '">' . $Qproducts->value('products_name') . '</a></li>';
}
ob_start();
include 'includes/modules/boxes/templates/order_history.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:30,代码来源:bm_order_history.php
示例3: paypal_express
function paypal_express()
{
global $PHP_SELF, $order, $payment, $request_type;
$this->_app = new OSCOM_PayPal();
$this->_app->loadLanguageFile('modules/EC/EC.php');
$this->signature = 'paypal|paypal_express|' . $this->_app->getVersion() . '|2.3';
$this->api_version = $this->_app->getApiVersion();
$this->code = 'paypal_express';
$this->title = $this->_app->getDef('module_ec_title');
$this->public_title = $this->_app->getDef('module_ec_public_title');
$this->description = '<div align="center">' . $this->_app->drawButton($this->_app->getDef('module_ec_legacy_admin_app_button'), tep_href_link('paypal.php', 'action=configure&module=EC'), 'primary', null, true) . '</div>';
$this->sort_order = defined('OSCOM_APP_PAYPAL_EC_SORT_ORDER') ? OSCOM_APP_PAYPAL_EC_SORT_ORDER : 0;
$this->enabled = defined('OSCOM_APP_PAYPAL_EC_STATUS') && in_array(OSCOM_APP_PAYPAL_EC_STATUS, array('1', '0')) ? true : false;
$this->order_status = defined('OSCOM_APP_PAYPAL_EC_ORDER_STATUS_ID') && (int) OSCOM_APP_PAYPAL_EC_ORDER_STATUS_ID > 0 ? (int) OSCOM_APP_PAYPAL_EC_ORDER_STATUS_ID : 0;
if (defined('OSCOM_APP_PAYPAL_EC_STATUS')) {
if (OSCOM_APP_PAYPAL_EC_STATUS == '0') {
$this->title .= ' [Sandbox]';
$this->public_title .= ' (' . $this->code . '; Sandbox)';
}
}
if (!function_exists('curl_init')) {
$this->description .= '<div class="secWarning">' . $this->_app->getDef('module_ec_error_curl') . '</div>';
$this->enabled = false;
}
if ($this->enabled === true) {
if (OSCOM_APP_PAYPAL_GATEWAY == '1') {
// PayPal
if (!$this->_app->hasCredentials('EC')) {
$this->description .= '<div class="secWarning">' . $this->_app->getDef('module_ec_error_credentials') . '</div>';
$this->enabled = false;
}
} else {
// Payflow
if (!$this->_app->hasCredentials('EC', 'payflow')) {
$this->description .= '<div class="secWarning">' . $this->_app->getDef('module_ec_error_credentials_payflow') . '</div>';
$this->enabled = false;
}
}
}
if ($this->enabled === true) {
if (isset($order) && is_object($order)) {
$this->update_status();
}
}
if (basename($PHP_SELF) == 'shopping_cart.php') {
if (OSCOM_APP_PAYPAL_GATEWAY == '1' && OSCOM_APP_PAYPAL_EC_CHECKOUT_FLOW == '1') {
if (isset($request_type) && $request_type != 'SSL' && ENABLE_SSL == true) {
tep_redirect(tep_href_link('shopping_cart.php', tep_get_all_get_params(), 'SSL'));
}
header('X-UA-Compatible: IE=edge', true);
}
}
// When changing the shipping address due to no shipping rates being available, head straight to the checkout confirmation page
if (basename($PHP_SELF) == 'checkout_payment.php' && tep_session_is_registered('appPayPalEcRightTurn')) {
tep_session_unregister('appPayPalEcRightTurn');
if (tep_session_is_registered('payment') && $payment == $this->code) {
tep_redirect(tep_href_link('checkout_confirmation.php', '', 'SSL'));
}
}
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:60,代码来源:paypal_express.php
示例4: execute
function execute()
{
global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
$check = tep_db_fetch_array($check_query);
$notification_exists = $check['count'] > 0 ? true : false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '"><span class="glyphicon glyphicon-remove"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
} else {
$notif_contents = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"><span class="glyphicon glyphicon-envelope"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
}
$data = NULL;
if ($this->group == 'boxes_product_page') {
$data .= '<div class="col-sm-4 product_box">';
}
$data .= '<div class="panel panel-default">' . ' <div class="panel-heading">' . '<a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_TITLE . '</a></div>' . ' <div class="panel-body">' . $notif_contents . '</div>' . '</div>';
if ($this->group == 'boxes_product_page') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:28,代码来源:bm_product_notifications.php
示例5: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate, $language;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
$languages_string = '';
reset($lng->catalog_languages);
foreach ($lng->catalog_languages as $key => $value) {
if ($value['directory'] == $language) {
$current_lang_key = $key;
break;
}
}
reset($lng->catalog_languages);
$home_page_redirect = defined('USU5_HOME_PAGE_REDIRECT') && USU5_HOME_PAGE_REDIRECT == 'true' ? true : false;
while (list($key, $value) = each($lng->catalog_languages)) {
if (defined('USU5_MULTI_LANGUAGE_SEO_SUPPORT') && USU5_MULTI_LANGUAGE_SEO_SUPPORT == 'true' && defined('USU5_ENABLED') && USU5_ENABLED == 'true') {
if (false === ($language == $value['directory'])) {
// we don't want to show a link to the currently loaded language
if (false !== $home_page_redirect) {
// If we are using the root site redirect
$link = str_replace(array(FILENAME_DEFAULT, '/' . $current_lang_key), '', tep_href_link(FILENAME_DEFAULT));
} else {
$link = str_replace('/' . $current_lang_key, '', tep_href_link(FILENAME_DEFAULT));
}
if ($key !== DEFAULT_LANGUAGE) {
// if it is not the default language we are dealing with
if (false === strpos($link, '.php') && false !== $home_page_redirect) {
$link_array = explode('?', $link);
$qs = array_key_exists(1, $link_array) ? '?' . $link_array[1] : '';
$link = $link_array[0] . FILENAME_DEFAULT . '/' . $key . $qs;
} else {
$link_array = explode('?', $link);
$qs = array_key_exists(1, $link_array) ? '?' . $link_array[1] : '';
$link = str_replace('.php', '.php/' . $key . $qs, $link);
}
}
// USU5 shows the language link and image
$languages_string .= ' <a href="' . $link . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
}
} else {
// Just do the standard osCommerce links
// Standard osCommerce shows the language link and image
$languages_string .= ' <a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
}
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LANGUAGES_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;">' . $languages_string . '</div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:55,代码来源:bm_languages.php
示例6: process_options
function process_options()
{
global $g_script, $messageStack;
$cStrings =& $this->strings;
// Prepare the options array for storage
$options_array = array('text_pages' => isset($_POST['text_pages']) ? 1 : 0, 'text_collections' => isset($_POST['text_collections']) ? 1 : 0, 'image_collections' => isset($_POST['image_collections']) ? 1 : 0);
// Store user options
$this->save_options($options_array);
$messageStack->add_session(sprintf($cStrings->SUCCESS_PLUGIN_RECONFIGURED, $this->title), 'success');
tep_redirect(tep_href_link($g_script, tep_get_all_get_params(array('action')) . 'action=set_options'));
}
开发者ID:enigma1,项目名称:i-metrics-cms,代码行数:11,代码来源:install.php
示例7: execute
function execute()
{
global $PHP_SELF, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
$languages = $this->lang->getAll();
$languages_string = '';
foreach ($languages as $code => $value) {
$languages_string .= ' <a href="' . OSCOM::link($PHP_SELF, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $code) . '">' . $this->lang->getImage($value['code']) . '</a> ';
}
ob_start();
include 'includes/modules/boxes/templates/languages.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:15,代码来源:bm_languages.php
示例8: execute
public function execute()
{
global $login_customer_id, $oscTemplate, $breadcrumb;
$this->page->setFile('login.php');
// redirect the customer to a friendly cookie-must-be-enabled page if cookies are disabled (or the session has not started)
if (session_status() !== PHP_SESSION_ACTIVE) {
if (!isset($_GET['cookie_test'])) {
$all_get = tep_get_all_get_params(['Account', 'LogIn', 'Process']);
OSCOM::redirect('index.php', 'Account&LogIn&' . $all_get . (empty($all_get) ? '' : '&') . 'cookie_test=1', 'SSL');
}
OSCOM::redirect('cookie_usage.php');
}
// login content module must return $login_customer_id as an integer after successful customer authentication
$login_customer_id = false;
$this->page->data['content'] = $oscTemplate->getContent('login');
require OSCOM::BASE_DIR . 'languages/' . $_SESSION['language'] . '/login.php';
$breadcrumb->add(NAVBAR_TITLE, OSCOM::link('index.php', 'Account&LogIn', 'SSL'));
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:18,代码来源:LogIn.php
示例9: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
$languages_string = '';
foreach ($lng->catalog_languages as $key => $value) {
$languages_string .= ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
}
$data = '<div class="panel panel-default">' . ' <div class="panel-heading">' . MODULE_BOXES_LANGUAGES_BOX_TITLE . '</div>' . ' <div class="panel-body text-center">' . $languages_string . '</div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:atmediacom,项目名称:oscommerce2,代码行数:18,代码来源:bm_languages.php
示例10: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
$languages_string = '';
foreach ($lng->catalog_languages as $key => $value) {
$languages_string .= ' <a href="' . OSCOM::link($PHP_SELF, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . HTML::image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name'], NULL, NULL, NULL, false) . '</a> ';
}
ob_start();
include 'includes/modules/boxes/templates/languages.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:19,代码来源:bm_languages.php
示例11: execute
function execute()
{
global $PHP_SELF, $lng, $request_type, $oscTemplate;
if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
if (!isset($lng) || isset($lng) && !is_object($lng)) {
include DIR_WS_CLASSES . 'language.php';
$lng = new language();
}
if (count($lng->catalog_languages) > 1) {
$languages_string = '';
reset($lng->catalog_languages);
while (list($key, $value) = each($lng->catalog_languages)) {
$languages_string .= ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('language', 'currency')) . 'language=' . $key, $request_type) . '">' . tep_image(DIR_WS_LANGUAGES . $value['directory'] . '/images/' . $value['image'], $value['name']) . '</a> ';
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_LANGUAGES_BOX_TITLE . '</div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;">' . $languages_string . '</div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:Sibzsolutions,项目名称:Savostore,代码行数:19,代码来源:bm_languages.php
示例12: execute
function execute()
{
global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
$check = tep_db_fetch_array($check_query);
$notification_exists = $check['count'] > 0 ? true : false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = '<table border="0" cellspacing="0" cellpadding="2" class="ui-widget-content infoBoxContents"><tr><td><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications_remove.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a></td><td><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a></td></tr></table>';
} else {
$notif_contents = '<table border="0" cellspacing="0" cellpadding="2" class="ui-widget-content infoBoxContents"><tr><td><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image(DIR_WS_IMAGES . 'box_products_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a></td><td><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a></td></tr></table>';
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_TITLE . '</a></div>' . ' ' . $notif_contents . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:wrtcoder,项目名称:mini_isp,代码行数:21,代码来源:bm_product_notifications.php
示例13: execute
function execute()
{
global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
$check = tep_db_fetch_array($check_query);
$notification_exists = $check['count'] > 0 ? true : false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = ' <ul class="module-content">' . ' <li>' . ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_draw_icon('fa-chain-broken') . '</a>' . ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>' . ' </li>' . ' </ul>';
} else {
$notif_contents = ' <ul class="module-content">' . ' <li>' . ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_draw_icon('fa-pencil-square-o') . '</a>' . ' <a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>' . ' </li>' . ' </ul>';
}
$data = '<div class="module notify-box">' . ' <h3 class="module-heading"><a href="' . tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL') . '">' . MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_TITLE . '</a></h3>' . ' ' . $notif_contents . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:21,代码来源:bm_product_notifications.php
示例14: execute
function execute()
{
global $oID;
$output = '';
$status = array();
$ppstatus_query = tep_db_query("select comments from orders_status_history where orders_id = '" . (int) $oID . "' and orders_status_id = '" . (int) OSCOM_APP_PAYPAL_TRANSACTIONS_ORDER_STATUS_ID . "' and comments like 'Transaction ID:%' order by date_added desc limit 1");
if (tep_db_num_rows($ppstatus_query)) {
$ppstatus = tep_db_fetch_array($ppstatus_query);
foreach (explode("\n", $ppstatus['comments']) as $s) {
if (!empty($s) && strpos($s, ':') !== false) {
$entry = explode(':', $s, 2);
$status[trim($entry[0])] = trim($entry[1]);
}
}
if (isset($status['Transaction ID'])) {
$order_query = tep_db_query("select o.orders_id, o.payment_method, o.currency, o.currency_value, ot.value as total from orders o, orders_total ot where o.orders_id = '" . (int) $oID . "' and o.orders_id = ot.orders_id and ot.class = 'ot_total'");
$order = tep_db_fetch_array($order_query);
$pp_server = strpos(strtolower($order['payment_method']), 'sandbox') !== false ? 'sandbox' : 'live';
$info_button = $this->_app->drawButton($this->_app->getDef('button_details'), tep_href_link('orders.php', 'page=' . $_GET['page'] . '&oID=' . $oID . '&action=edit&tabaction=getTransactionDetails'), 'primary', null, true);
$capture_button = $this->getCaptureButton($status, $order);
$void_button = $this->getVoidButton($status, $order);
$refund_button = $this->getRefundButton($status, $order);
$paypal_button = $this->_app->drawButton($this->_app->getDef('button_view_at_paypal'), 'https://www.' . ($pp_server == 'sandbox' ? 'sandbox.' : '') . 'paypal.com/cgi-bin/webscr?cmd=_view-a-trans&id=' . $status['Transaction ID'], 'info', 'target="_blank"', true);
$tab_title = addslashes($this->_app->getDef('tab_title'));
$tab_link = substr(tep_href_link('orders.php', tep_get_all_get_params()), strlen($base_url)) . '#section_paypal_content';
$output = <<<EOD
<script>
\$(function() {
\$('#orderTabs ul').append('<li><a href="{$tab_link}">{$tab_title}</a></li>');
});
</script>
<div id="section_paypal_content" style="padding: 10px;">
{$info_button} {$capture_button} {$void_button} {$refund_button} {$paypal_button}
</div>
EOD;
}
}
return $output;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:40,代码来源:tab.php
示例15: execute
function execute()
{
global $PHP_SELF, $request_type, $oscTemplate;
if (isset($_GET['products_id'])) {
if (isset($_SESSION['customer_id'])) {
$Qcheck = Registry::get('Db')->get('products_notifications', 'products_id', ['customers_id' => $_SESSION['customer_id'], 'products_id' => $_GET['products_id']]);
$notification_exists = $Qcheck->fetch() !== false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = '<a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '"><span class="glyphicon glyphicon-remove"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($_GET['products_id'])) . '</a>';
} else {
$notif_contents = '<a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"><span class="glyphicon glyphicon-envelope"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($_GET['products_id'])) . '</a>';
}
ob_start();
include 'includes/modules/boxes/templates/product_notifications.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:22,代码来源:bm_product_notifications.php
示例16: execute
function execute()
{
global $PHP_SELF, $oscTemplate;
if (isset($_GET['products_id'])) {
if (isset($_SESSION['customer_id'])) {
$Qcheck = Registry::get('Db')->get('products_notifications', 'products_id', ['customers_id' => $_SESSION['customer_id'], 'products_id' => (int) $_GET['products_id']]);
$notification_exists = $Qcheck->fetch() !== false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = '<a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove') . '"><span class="fa fa-remove"></span> ' . OSCOM::getDef('module_boxes_product_notifications_box_notify_remove', ['products_name' => tep_get_products_name($_GET['products_id'])]) . '</a>';
} else {
$notif_contents = '<a href="' . OSCOM::link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify') . '"><span class="fa fa-envelope"></span> ' . OSCOM::getDef('module_boxes_product_notifications_box_notify', ['products_name' => tep_get_products_name($_GET['products_id'])]) . '</a>';
}
ob_start();
include 'includes/modules/boxes/templates/product_notifications.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:22,代码来源:bm_product_notifications.php
示例17: execute
function execute()
{
global $HTTP_GET_VARS, $customer_id, $PHP_SELF, $request_type, $oscTemplate;
if (isset($HTTP_GET_VARS['products_id'])) {
if (tep_session_is_registered('customer_id')) {
$check_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int) $customer_id . "'");
$check = tep_db_fetch_array($check_query);
$notification_exists = $check['count'] > 0 ? true : false;
} else {
$notification_exists = false;
}
$notif_contents = '';
if ($notification_exists == true) {
$notif_contents = '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '"><span class="glyphicon glyphicon-remove"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
} else {
$notif_contents = '<a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '"><span class="glyphicon glyphicon-envelope"></span> ' . sprintf(MODULE_BOXES_PRODUCT_NOTIFICATIONS_BOX_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a>';
}
ob_start();
include DIR_WS_MODULES . 'boxes/templates/product_notifications.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:jdogrulz,项目名称:Responsive-osCommerce,代码行数:23,代码来源:bm_product_notifications.php
示例18: execute
function execute()
{
global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
if (tep_session_is_registered('customer_id')) {
// retreive the last x products purchased
$orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
if (tep_db_num_rows($orders_query)) {
$product_ids = '';
while ($orders = tep_db_fetch_array($orders_query)) {
$product_ids .= (int) $orders['products_id'] . ',';
}
$product_ids = substr($product_ids, 0, -1);
$customer_orders_string = '<ul class="module-content box-list">';
$products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
$customer_orders_string .= ' <li>' . ' <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a>' . ' <a class="remove" href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '">' . tep_draw_icon('fa-shopping-cart') . '</a>' . ' </li>';
}
$customer_orders_string .= '</ul>';
$data = '<div class="module order-history">' . ' <h3 class="module-heading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</h3>' . ' ' . $customer_orders_string . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:23,代码来源:bm_order_history.php
示例19: execute
function execute()
{
global $customer_id, $languages_id, $PHP_SELF, $oscTemplate;
if (tep_session_is_registered('customer_id')) {
// retreive the last x products purchased
$orders_query = tep_db_query("select distinct op.products_id from " . TABLE_ORDERS . " o, " . TABLE_ORDERS_PRODUCTS . " op, " . TABLE_PRODUCTS . " p where o.customers_id = '" . (int) $customer_id . "' and o.orders_id = op.orders_id and op.products_id = p.products_id and p.products_status = '1' group by products_id order by o.date_purchased desc limit " . MAX_DISPLAY_PRODUCTS_IN_ORDER_HISTORY_BOX);
if (tep_db_num_rows($orders_query)) {
$product_ids = '';
while ($orders = tep_db_fetch_array($orders_query)) {
$product_ids .= (int) $orders['products_id'] . ',';
}
$product_ids = substr($product_ids, 0, -1);
$customer_orders_string = '<table border="0" width="100%" cellspacing="0" cellpadding="1" class="ui-widget-content infoBoxContents">';
$products_query = tep_db_query("select products_id, products_name from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id in (" . $product_ids . ") and language_id = '" . (int) $languages_id . "' order by products_name");
while ($products = tep_db_fetch_array($products_query)) {
$customer_orders_string .= ' <tr>' . ' <td><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products['products_id']) . '">' . $products['products_name'] . '</a></td>' . ' <td align="right" valign="top"><a href="' . tep_href_link($PHP_SELF, tep_get_all_get_params(array('action')) . 'action=cust_order&pid=' . $products['products_id']) . '">' . tep_image(DIR_WS_ICONS . 'cart.gif', ICON_CART) . '</a></td>' . ' </tr>';
}
$customer_orders_string .= '</table>';
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading">' . MODULE_BOXES_ORDER_HISTORY_BOX_TITLE . '</div>' . ' ' . $customer_orders_string . '</div>';
|
请发表评论