本文整理汇总了PHP中tep_get_products_name函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_get_products_name函数的具体用法?PHP tep_get_products_name怎么用?PHP tep_get_products_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_get_products_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
global $currencies, $oscTemplate;
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}
if ($this->group == 'boxes_footer') {
$data = '<div class="col-sm-3 col-lg-2">' . ' <div class="footerbox best-sellers">' . ' <h2><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></h2>';
} else {
$data = '<div class="panel panel-default">' . ' <div class="panel-heading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>';
}
$data .= ' <div class="panel-body text-center"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>';
$data .= '</div>';
if ($this->group == 'boxes_footer') {
$data .= '</div>';
}
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:osc2nuke,项目名称:demobts,代码行数:25,代码来源:bm_whats_new.php
示例2: 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
示例3: execute
function execute()
{
global $currencies, $oscTemplate;
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<del class="old-price price">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
$whats_new_price .= '<span class="new-price price">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = '<span class="price">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
}
$data = '<div class="module new-products-box">' . ' <h3 class="module-heading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></h3>' . ' <ul class="module-content boxproduct">' . ' <li class="clearfix">' . ' <a class="boxproduct-img" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, '', '') . '</a>' . ' <div class="boxproduct-info">' . ' <a class="product-name boxproduct-name" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a>' . ' <div class="price-box">' . $whats_new_price . '</div>' . ' </div>' . ' </li>' . ' </ul>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:templatemonster,项目名称:oscommerce,代码行数:16,代码来源:bm_whats_new.php
示例4: execute
function execute()
{
global $currencies, $oscTemplate;
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}
ob_start();
include 'includes/modules/boxes/templates/whats_new.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:18,代码来源:bm_whats_new.php
示例5: execute
function execute()
{
global $currencies, $oscTemplate;
if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
// $whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
// osc-support-edition BOF
$whats_new_price = '<del>' . $currencies->display_price_normal($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
// osc-support-edition EOF
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}
$data = '<div class="ui-widget infoBoxContainer">' . ' <div class="ui-widget-header infoBoxHeading"><a href="' . tep_href_link(FILENAME_PRODUCTS_NEW) . '">' . MODULE_BOXES_WHATS_NEW_BOX_TITLE . '</a></div>' . ' <div class="ui-widget-content infoBoxContents" style="text-align: center;"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br /><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br />' . $whats_new_price . '</div>' . '</div>';
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:tapwag,项目名称:oscommerce_deutsch,代码行数:19,代码来源:bm_whats_new.php
示例6: 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
示例7: 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
示例8: 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
示例9: execute
function execute()
{
global $currencies, $oscTemplate;
$OSCOM_Db = Registry::get('Db');
$Qcheck = $OSCOM_Db->query('select products_id, products_image, products_tax_class_id, products_price from :table_products where products_status = 1 order by products_date_added desc limit ' . (int) MAX_RANDOM_SELECT_NEW);
$result = $Qcheck->fetchAll();
if (count($result) > 0) {
$random_product = $result[mt_rand(0, count($result) - 1)];
$random_product['products_name'] = tep_get_products_name($random_product['products_id']);
$random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<del>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</del><br />';
$whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
} else {
$whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
}
ob_start();
include 'includes/modules/boxes/templates/whats_new.php';
$data = ob_get_clean();
$oscTemplate->addBlock($data, $this->group);
}
}
开发者ID:tiansiyuan,项目名称:oscommerce2,代码行数:22,代码来源:bm_whats_new.php
示例10: 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
示例11: 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
示例12: getOutput
function getOutput()
{
global $oscTemplate;
// add the js in the footer
$oscTemplate->addBlock('<script src="//assets.pinterest.com/js/pinit.js"></script>', 'footer_scripts');
$params = array();
// grab the product name (used for description)
$params['description'] = tep_get_products_name($_GET['products_id']);
// and image (used for media)
$image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . (int) $_GET['products_id'] . "'");
$image = tep_db_fetch_array($image_query);
if (tep_not_null($image['products_image'])) {
$image_file = $image['products_image'];
$pi_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $_GET['products_id'] . "' order by sort_order");
if (tep_db_num_rows($pi_query) > 0) {
while ($pi = tep_db_fetch_array($pi_query)) {
if (tep_not_null($pi['image'])) {
$image_file = $pi['image'];
// overwrite image with first multiple product image
break;
}
}
}
$params['media'] = tep_href_link('images/' . $image_file, '', 'NONSSL', false);
}
// url
$params['url'] = tep_href_link('product_info.php', 'products_id=' . $_GET['products_id'], 'NONSSL', false);
$output = '<a href="http://pinterest.com/pin/create/button/?';
foreach ($params as $key => $value) {
$output .= $key . '=' . urlencode($value) . '&';
}
$output = substr($output, 0, -1);
//remove last & from the url
$output .= '" class="pin-it-button" count-layout="' . strtolower(MODULE_SOCIAL_BOOKMARKS_PINTEREST_BUTTON_COUNT_POSITION) . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="' . $this->public_title . '" /></a>';
return $output;
}
开发者ID:katapofatico,项目名称:Responsive-osCommerce,代码行数:36,代码来源:sb_pinterest.php
示例13: getOutput
function getOutput()
{
global $oscTemplate;
$OSCOM_Db = Registry::get('Db');
// add the js in the footer
$oscTemplate->addBlock('<script src="//assets.pinterest.com/js/pinit.js"></script>', 'footer_scripts');
$params = array();
// grab the product name (used for description)
$params['description'] = tep_get_products_name($_GET['products_id']);
// and image (used for media)
$Qimage = $OSCOM_Db->get('products', 'products_image', ['products_id' => (int) $_GET['products_id']]);
if (!empty($Qimage->value('products_image'))) {
$image_file = $Qimage->value('products_image');
$Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => (int) $_GET['products_id']], 'sort_order');
if ($Qimage->fetch() !== false) {
do {
if (!empty($Qimage->value('image'))) {
$image_file = $Qimage->value('image');
// overwrite image with first multiple product image
break;
}
} while ($Qimage->fetch());
}
$params['media'] = OSCOM::linkImage($image_file);
}
// url
$params['url'] = OSCOM::link('product_info.php', 'products_id=' . $_GET['products_id'], false);
$output = '<a href="http://pinterest.com/pin/create/button/?';
foreach ($params as $key => $value) {
$output .= $key . '=' . urlencode($value) . '&';
}
$output = substr($output, 0, -1);
//remove last & from the url
$output .= '" class="pin-it-button" count-layout="' . strtolower(MODULE_SOCIAL_BOOKMARKS_PINTEREST_BUTTON_COUNT_POSITION) . '"><img border="0" src="//assets.pinterest.com/images/PinExt.png" title="' . $this->public_title . '" /></a>';
return $output;
}
开发者ID:haraldpdl,项目名称:oscommerce2,代码行数:36,代码来源:sb_pinterest.php
示例14: tep_upload_order
//.........这里部分代码省略.........
$order_discount_sum = $order_total['value'];
}
}
$order_payment_id = $order->info['payment_method_class'];
if (empty($order_payment_id)) {
reset($payment_modules);
$payment_found = false;
while (list($k, $v) = each($payment_modules)) {
if (strpos($v, $order->info['payment_method']) !== false) {
$order_payment_id = $k;
break;
}
}
if (empty($order_payment_id)) {
$order_payment_id = $order->info['payment_method'];
}
}
$order_shipping_id = $order->delivery['delivery_method_class'];
if (empty($order_shipping_id)) {
reset($shipping_modules);
$shipping_found = false;
while (list($k, $v) = each($shipping_modules)) {
if (strpos($v, $order_shipping_title) !== false) {
$order_shipping_id = $k;
break;
}
}
if (empty($order_shipping_id)) {
$order_shipping_id = $order_shipping_title;
}
}
$self_delivery_id = $order->delivery['delivery_self_address_id'];
if (tep_not_null($order->delivery['delivery_self_address']) && (int) $self_delivery_id <= 0) {
$shop_info_query = tep_db_query("select shops_database from " . TABLE_SHOPS . " where shops_id = '" . (int) $order->info['shops_id'] . "'");
$shop_info = tep_db_fetch_array($shop_info_query);
tep_db_select_db($shop_info['shops_database']);
$self_delivery_query = tep_db_query("select self_delivery_id, self_delivery_cost, self_delivery_free, entry_suburb as suburb, entry_city as city, entry_street_address as street_address, entry_telephone as telephone, self_delivery_description from " . TABLE_SELF_DELIVERY . " where 1 order by city, street_address");
while ($self_delivery = tep_db_fetch_array($self_delivery_query)) {
$self_delivery_address = tep_address_format($order->delivery['format_id'], $self_delivery, 1, '', ', ');
if (strpos($order->delivery['delivery_self_address'], $self_delivery_address) !== false) {
$self_delivery_id = $self_delivery['self_delivery_id'];
break;
}
}
tep_db_select_db(DB_DATABASE);
if ($self_delivery_id == 0) {
$self_delivery_id = $order->info['self_delivery'];
}
}
$date_purchased = preg_replace('/(\\d{4})-(\\d{2})-(\\d{2}) (\\d{2}):(\\d{2}):(\\d{2})/', '$3.$2.$1 $4:$5:$6', $order->info['date_purchased']);
$date_purchased = preg_replace('/\\s{2,}/', ' ', $date_purchased);
$is_europe = '';
$europe_check_query = tep_db_query("select count(*) as total from setbook_eu." . TABLE_COUNTRIES . " where countries_name like '" . tep_db_input($order->delivery['country']) . "' or countries_ru_name like '" . tep_db_input($order->delivery['country']) . "' or countries_iso_code_2 like '" . tep_db_input($order->delivery['country']) . "' or countries_iso_code_3 like '" . tep_db_input($order->delivery['country']) . "'");
$europe_check = tep_db_fetch_array($europe_check_query);
if ($europe_check['total'] > 0) {
$is_europe = 'e';
}
$order_delivery_country_code = '';
$country_code_info_query = tep_db_query("select countries_iso_code_2 from " . $shop_info['shops_database'] . "." . TABLE_COUNTRIES . " where countries_name = '" . tep_db_input($order->delivery['country']) . "' or countries_ru_name = '" . tep_db_input($order->delivery['country']) . "'");
$country_code_info = tep_db_fetch_array($country_code_info_query);
$order_delivery_country_code = $country_code_info['countries_iso_code_2'];
if ($order_delivery_country_code == '') {
$order_delivery_country = strtolower($order->delivery['country']);
$all_countries_file = UPLOAD_DIR . 'csv/all_countries.csv';
$fc = fopen($all_countries_file, 'r');
while ((list($country_name, $country_ru_name, $country_iso_code_2, $country_iso_code_3) = fgetcsv($fc, 40000, ";")) !== FALSE) {
$country_name = strtolower($country_name);
$country_ru_name = strtolower($country_ru_name);
$country_iso_code_3 = strtolower($country_iso_code_3);
if ($order_delivery_country == $country_name || $order_delivery_country == $country_ru_name || $order_delivery_country == $country_iso_code_3) {
$order_delivery_country_code = $country_iso_code_2;
break;
}
}
fclose($fc);
}
if ($order_delivery_country_code == '') {
$fc = fopen($all_countries_file, 'r');
while ((list($country_name, $country_ru_name, $country_iso_code_2, $country_iso_code_3) = fgetcsv($fc, 40000, ";")) !== FALSE) {
$country_name = strtolower($country_name);
$country_ru_name = strtolower($country_ru_name);
if (strpos($country_name, $order_delivery_country) !== false || strpos($country_ru_name, $order_delivery_country) !== false || strpos($country_iso_code_3, $order_delivery_country) !== false) {
$order_delivery_country_code = $country_iso_code_2;
break;
}
}
fclose($fc);
}
$common_data = array($insert_id, $date_purchased, $order->info['shops_id'], $order->customer['id'], $order->customer['email_address'], $order->delivery['name'], '', '', $order_payment_id, $order_shipping_id, str_replace(',', '.', $order_shipping_sum), $order->info['currency'], str_replace(',', '.', $order->info['currency_value']), tep_html_entity_decode($order->delivery['state']), tep_html_entity_decode($order->delivery['suburb']), tep_html_entity_decode($order->delivery['city']), $order->delivery['postcode'], tep_html_entity_decode($order->delivery['street_address']), $order->delivery['telephone'], tep_html_entity_decode($order->info['comments']), $self_delivery_id, $order_history_link, str_replace(',', '.', $order_total_sum), str_replace(',', '.', abs($order_discount_sum)), tep_html_entity_decode($order->customer['company']), $order->customer['company_inn'], $order->customer['company_kpp'], $order->customer['company_address_corporate'], $is_europe, $order->info['delivery_transfer_days'], $order->info['code'], $order->delivery['country'], tep_html_entity_decode($order_delivery_country_code), $order->customer['company_corporate']);
fputcsvsafe($fp, $common_data, $delimiter);
// tep_db_query("update " . TABLE_ORDERS . " set payment_method_class = '" . tep_db_input($order_payment_id) . "', delivery_method_class = '" . tep_db_input($order_shipping_id) . "', delivery_self_address_id = '" . (int)$self_delivery_id . "' where orders_id = '" . (int)$insert_id . "'");
reset($order->products);
while (list(, $product) = each($order->products)) {
$product_code = (int) str_replace('bbk', '', $product['code']);
$common_data = array($product['type'], $product_code, $product['qty'], str_replace(',', '.', $product['final_price']), $product['id'], $product['seller_code'], $product['name'], tep_get_products_name($product['id']), $product['code'], $product['warranty']);
fputcsvsafe($fp, $common_data, $delimiter);
}
fclose($fp);
}
}
开发者ID:rabbit-source,项目名称:setbook.ru,代码行数:101,代码来源:general.php
示例15: tep_black_line
<td class="dataTableHeadingContent" align="center"> <?php
echo TABLE_HEADING_ACTION;
?>
</td>
</tr>
<tr>
<td colspan="7"><?php
echo tep_black_line();
?>
</td>
</tr>
<?php
$next_id = 1;
$attributes = tep_db_query($attributes);
while ($attributes_values = tep_db_fetch_array($attributes)) {
$products_name_only = tep_get_products_name($attributes_values['products_id']);
$options_name = tep_options_name($attributes_values['options_id']);
$values_name = tep_values_name($attributes_values['options_values_id']);
$rows++;
?>
<tr class="<?php
echo floor($rows / 2) == $rows / 2 ? 'attributes-even' : 'attributes-odd';
?>
">
<?php
if ($action == 'update_attribute' && $HTTP_GET_VARS['attribute_id'] == $attributes_values['products_attributes_id']) {
?>
<td class="smallText"> <?php
echo $attributes_values['products_attributes_id'];
?>
<input type="hidden" name="attribute_id" value="<?php
开发者ID:pcchynoweth,项目名称:oscommerce2,代码行数:31,代码来源:products_attributes.php
示例16: foreach
Released under the GNU General Public License
*/
if (defined('MODULE_SHOPBYPRICE_RANGES') && MODULE_SHOPBYPRICE_RANGES > 0) {
?>
<!-- shop_by_price eof//-->
<div class="well" style="border:3px solid red">
<div class="box-header small-margin-bottom small-margin-left"><?php
echo BOX_HEADING_SPECIALS;
?>
</div>
<?php
foreach ($specials->rows as $product_specials22) {
$product_specials22_id = $product_specials22['products_id'];
$product_specials22_image = tep_get_products_image($product_specials22['products_id']);
$product_specials22_name = tep_get_products_name($product_specials22['products_id']);
$pf->loadProduct($product_specials22['products_id'], $languages_id);
$special_random_price = $pf->getPriceStringShort();
echo '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials22_id) . '">' . tep_image(DIR_WS_IMAGES . $product_specials22_image, $product_specials22_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_specials22_id) . '">' . $product_specials22_name . '</a><br>' . $special_random_price;
}
?>
</div>
<?php
}
?>
<!-- specials eof//-->
开发者ID:resultsonlyweb,项目名称:loaded6-template,代码行数:30,代码来源:specials.php
示例17: array
Released under the GNU General Public License
*/
if (isset($HTTP_GET_VARS['products_id'])) {
?>
<!-- notifications //-->
<tr>
<td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_NOTIFICATIONS);
new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_ACCOUNT_NOTIFICATIONS, '', 'SSL'));
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;
}
$info_box_contents = array();
if ($notification_exists == true) {
$info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><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 class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY_REMOVE, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a></td></tr></table>');
} else {
$info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><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 class="infoBoxContents"><a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . sprintf(BOX_NOTIFICATIONS_NOTIFY, tep_get_products_name($HTTP_GET_VARS['products_id'])) . '</a></td></tr></table>');
}
new infoBox($info_box_contents);
?>
</td>
</tr>
<!-- notifications_eof //-->
<?php
}
开发者ID:laiello,项目名称:myopensources,代码行数:31,
|
请发表评论