本文整理汇总了PHP中tep_get_products_special_price函数的典型用法代码示例。如果您正苦于以下问题:PHP tep_get_products_special_price函数的具体用法?PHP tep_get_products_special_price怎么用?PHP tep_get_products_special_price使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了tep_get_products_special_price函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
}
示例2: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $product_check, $languages_id, $currency;
if ($product_check['total'] > 0) {
$product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from products p, products_description pd where p.products_id = '" . (int) $_GET['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('og:type' => 'product', 'og:title' => $product_info['products_name'], 'og:site_name' => STORE_NAME);
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197) . '...';
$data['og:description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from products_images where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['og:image'] = tep_href_link('images/' . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = $this->format_raw($new_price);
} else {
$products_price = $this->format_raw($product_info['products_price']);
}
$data['product:price:amount'] = $products_price;
$data['product:price:currency'] = $currency;
$data['og:url'] = tep_href_link('product_info.php', 'products_id=' . $product_info['products_id'], 'NONSSL', false);
$data['product:availability'] = $product_info['products_quantity'] > 0 ? MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_IN_STOCK : MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_OUT_OF_STOCK;
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta property="' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . PHP_EOL;
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
示例3: execute
function execute()
{
global $PHP_SELF, $HTTP_GET_VARS, $oscTemplate, $languages_id, $currencies, $currency, $product_check;
if ($PHP_SELF == FILENAME_PRODUCT_INFO && isset($HTTP_GET_VARS['products_id'])) {
if ($product_check['total'] > 0) {
$product_info_query = tep_db_query("select p.products_id, COALESCE(NULLIF(pd.products_seo_title, ''), pd.products_name) as products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('card' => 'product', 'title' => $product_info['products_name']);
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
$data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
}
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
$data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['image:src'] = tep_href_link(DIR_WS_IMAGES . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']));
} else {
$products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}
$data['data1'] = $products_price;
$data['label1'] = $currency;
if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_PRE_ORDER;
$data['label2'] = tep_date_short($product_info['products_date_available']);
} elseif ($product_info['products_quantity'] > 0) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_IN_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_BUY_NOW;
} else {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_OUT_OF_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_CONTACT_US;
}
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta name="twitter:' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
}
示例4: execute
function execute()
{
global $PHP_SELF, $oscTemplate;
$OSCOM_Db = Registry::get('Db');
$OSCOM_Language = Registry::get('Language');
if (basename($PHP_SELF) == 'product_info.php') {
$Qproduct = $OSCOM_Db->prepare('select
p.products_id,
pd.products_name,
pd.products_description,
p.products_image,
p.products_price,
p.products_quantity,
p.products_tax_class_id,
p.products_date_available
from
:table_products p,
:table_products_description pd
where
p.products_id = :products_id
and p.products_status = 1
and p.products_id = pd.products_id
and pd.language_id = :language_id');
$Qproduct->bindInt(':products_id', $_GET['products_id']);
$Qproduct->bindInt(':language_id', $OSCOM_Language->getId());
$Qproduct->execute();
if ($Qproduct->fetch() !== false) {
$data = array('og:type' => 'product', 'og:title' => $Qproduct->value('products_name'), 'og:site_name' => STORE_NAME);
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197) . '...';
$data['og:description'] = $product_description;
$products_image = $Qproduct->value('products_image');
$Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1);
if ($Qimage->fetch() !== false) {
$products_image = $Qimage->value('image');
}
$data['og:image'] = OSCOM::linkImage($products_image);
if ($new_price = tep_get_products_special_price($Qproduct->valueInt('products_id'))) {
$products_price = $this->format_raw($new_price);
} else {
$products_price = $this->format_raw($Qproduct->value('products_price'));
}
$data['product:price:amount'] = $products_price;
$data['product:price:currency'] = $_SESSION['currency'];
$data['og:url'] = OSCOM::link('product_info.php', 'products_id=' . $Qproduct->valueInt('products_id'), false);
$data['product:availability'] = $Qproduct->valueInt('products_quantity') > 0 ? OSCOM::getDef('module_header_tags_product_opengraph_text_in_stock') : OSCOM::getDef('module_header_tags_product_opengraph_text_out_of_stock');
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta property="' . HTML::outputProtected($key) . '" content="' . HTML::outputProtected($value) . '" />' . PHP_EOL;
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
示例5: execute
function execute()
{
global $PHP_SELF, $oscTemplate, $currencies;
$OSCOM_Db = Registry::get('Db');
if ($PHP_SELF == 'product_info.php' && isset($_GET['products_id'])) {
$Qproduct = $OSCOM_Db->prepare('select p.products_id, pd.products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from :table_products p, :table_products_description pd where p.products_id = :products_id and p.products_status = 1 and p.products_id = pd.products_id and pd.language_id = :language_id');
$Qproduct->bindInt(':products_id', $_GET['products_id']);
$Qproduct->bindInt(':language_id', $_SESSION['languages_id']);
$Qproduct->execute();
if ($Qproduct->fetch() !== false) {
$data = array('card' => 'product', 'title' => $Qproduct->value('products_name'));
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID)) {
$data['site'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_SITE_ID;
}
if (tep_not_null(MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID)) {
$data['creator'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_USER_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($Qproduct->value('products_description')))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['description'] = $product_description;
$products_image = $Qproduct->value('products_image');
$Qimage = $OSCOM_Db->get('products_images', 'image', ['products_id' => $Qproduct->valueInt('products_id')], 'sort_order', 1);
if ($Qimage->fetch() !== false) {
$products_image = $Qimage->value('image');
}
$data['image:src'] = OSCOM::link(DIR_WS_IMAGES . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($Qproduct->valueInt('products_id'))) {
$products_price = $currencies->display_price($new_price, tep_get_tax_rate($Qproduct->valueInt('products_tax_class_id')));
} else {
$products_price = $currencies->display_price($Qproduct->value('products_price'), tep_get_tax_rate($Qproduct->valueInt('products_tax_class_id')));
}
$data['data1'] = $products_price;
$data['label1'] = $_SESSION['currency'];
if ($Qproduct->value('products_date_available') > date('Y-m-d H:i:s')) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_PRE_ORDER;
$data['label2'] = tep_date_short($Qproduct->value('products_date_available'));
} elseif ($Qproduct->valueInt('products_quantity') > 0) {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_IN_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_BUY_NOW;
} else {
$data['data2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_OUT_OF_STOCK;
$data['label2'] = MODULE_HEADER_TAGS_TWITTER_PRODUCT_CARD_TEXT_CONTACT_US;
}
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta name="twitter:' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
示例6: 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);
}
}
示例7: 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);
}
}
示例8: 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);
}
}
示例9: execute
function execute()
{
global $PHP_SELF, $HTTP_GET_VARS, $oscTemplate, $languages_id, $currencies, $currency, $product_check;
if ($PHP_SELF == FILENAME_PRODUCT_INFO && isset($HTTP_GET_VARS['products_id'])) {
if ($product_check['total'] > 0) {
$product_info_query = tep_db_query("select p.products_id, COALESCE(NULLIF(pd.products_seo_title, ''), pd.products_name) as products_name, pd.products_description, p.products_image, p.products_price, p.products_quantity, p.products_tax_class_id, p.products_date_available from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "' and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
if (tep_db_num_rows($product_info_query) === 1) {
$product_info = tep_db_fetch_array($product_info_query);
$data = array('og:type' => 'product', 'og:title' => $product_info['products_name'], 'og:site_name' => STORE_NAME);
if (tep_not_null(MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_APP_ID)) {
$data['fb:app_id'] = MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_APP_ID;
}
$product_description = substr(trim(preg_replace('/\\s\\s+/', ' ', strip_tags($product_info['products_description']))), 0, 197);
if (strlen($product_description) == 197) {
$product_description .= ' ..';
}
$data['og:description'] = $product_description;
$products_image = $product_info['products_image'];
$pi_query = tep_db_query("select image from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int) $product_info['products_id'] . "' order by sort_order limit 1");
if (tep_db_num_rows($pi_query) === 1) {
$pi = tep_db_fetch_array($pi_query);
$products_image = $pi['image'];
}
$data['og:image'] = tep_href_link(DIR_WS_IMAGES . $products_image, '', 'NONSSL', false, false);
if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
$products_price = $this->format_raw($new_price);
} else {
$products_price = $this->format_raw($product_info['products_price']);
}
$data['product:price:amount'] = $products_price;
$data['product:price:currency'] = $currency;
$data['og:url'] = tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL', false);
$data['product:availability'] = $product_info['products_quantity'] > 0 ? MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_IN_STOCK : MODULE_HEADER_TAGS_PRODUCT_OPENGRAPH_TEXT_OUT_OF_STOCK;
$result = '';
foreach ($data as $key => $value) {
$result .= '<meta property="' . tep_output_string_protected($key) . '" content="' . tep_output_string_protected($value) . '" />' . "\n";
}
$oscTemplate->addBlock($result, $this->group);
}
}
}
}
示例10: 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);
}
}
示例11: tep_db_num_rows
//$xsell_query = tep_db_query("select distinct p.products_id, p.products_image, pd.products_name, p.products_tax_class_id, products_price from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where xp.products_id = '" . $_GET['products_id'] . "' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '" . $languages_id . "' and p.products_status = '1' order by sort_order asc limit " . MAX_DISPLAY_ALSO_PURCHASED);
}
// EOF Separate Pricing Per Customer
$num_products_xsell = tep_db_num_rows($xsell_query);
if ($num_products_xsell > 0) {
?>
<!-- xsell_products //-->
<?php
$info_box_contents = array();
$info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_PRODUCTS);
new contentBoxHeading($info_box_contents);
$row = 0;
$col = 0;
$info_box_contents = array();
while ($xsell = tep_db_fetch_array($xsell_query)) {
$xsell['specials_new_products_price'] = tep_get_products_special_price($xsell['products_id']);
if ($xsell['specials_new_products_price']) {
$xsell_price = '<s>' . $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</s><br>';
$xsell_price .= '<span class="productSpecialPrice">' . $currencies->display_price($xsell['specials_new_products_price'], tep_get_tax_rate($xsell['products_tax_class_id'])) . '</span>';
} else {
$xsell_price = $currencies->display_price($xsell['products_price'], tep_get_tax_rate($xsell['products_tax_class_id']));
}
//Cache
$text = '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] . '</a><br>' . $xsell_price . '<br><a href="' . tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('action')) . 'action=buy_now&products_id=' . $xsell['products_id'], 'NONSSL') . '">' . tep_image_button('button_buy_now.gif', TEXT_BUY . $xsell['products_name'] . TEXT_NOW) . '</a>';
//Fin cache
$info_box_contents[$row][$col] = array('align' => 'center', 'params' => 'class="smallText" width="33%" valign="top"', 'text' => $text);
//Modifié Cache
//Cache
$cache .= '$info_box_contents[' . $row . '][' . $col . '] = array(\'align\' => \'center\',
\'params\' => \'class="smallText" width="33%" valign="top"\',
\'text\' => \'' . str_replace("'", "\\'", $text) . '\');';
开发者ID:eosc,项目名称:EosC-2.3,代码行数:31,代码来源:xsell_products+-+for+enabled-disabled+categories+only+-+rename.php
示例12: tep_get_all_get_params
$error = true;
$messageStack->add('review', JS_REVIEW_TEXT);
}
if ($rating < 1 || $rating > 5) {
$error = true;
$messageStack->add('review', JS_REVIEW_RATING);
}
if ($error == false) {
$OSCOM_Db->save('reviews', ['products_id' => $Qcheck->valueInt('products_id'), 'customers_id' => $_SESSION['customer_id'], 'customers_name' => $Qcustomer->value('customers_firstname') . ' ' . $Qcustomer->value('customers_lastname'), 'reviews_rating' => $rating, 'date_added' => 'now()']);
$insert_id = $OSCOM_Db->lastInsertId();
$OSCOM_Db->save('reviews_description', ['reviews_id' => $insert_id, 'languages_id' => $_SESSION['languages_id'], 'reviews_text' => $review]);
$messageStack->add_session('product_reviews', TEXT_REVIEW_RECEIVED, 'success');
OSCOM::redirect('product_reviews.php', tep_get_all_get_params(array('action')));
}
}
if ($new_price = tep_get_products_special_price($Qcheck->valueInt('products_id'))) {
$products_price = '<del>' . $currencies->display_price($Qcheck->valueDecimal('products_price'), tep_get_tax_rate($Qcheck->valueInt('products_tax_class_id'))) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($Qcheck->valueInt('products_tax_class_id'))) . '</span>';
} else {
$products_price = $currencies->display_price($Qcheck->valueDecimal('products_price'), tep_get_tax_rate($Qcheck->valueInt('products_tax_class_id')));
}
$products_name = $Qcheck->value('products_name');
if (!empty($Qcheck->value('products_model'))) {
$products_name .= ' <small>[' . $Qcheck->value('products_model') . ']</small>';
}
$breadcrumb->add(NAVBAR_TITLE, OSCOM::link('product_reviews.php', tep_get_all_get_params()));
require 'includes/template_top.php';
?>
<div class="page-header">
<div class="row">
<h1 class="col-sm-8"><?php
示例13: Copyright
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2003 osCommerce
Released under the GNU General Public License
*/
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)) {
?>
<!-- whats_new //-->
<tr>
<td>
<?php
$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']);
$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));
if (tep_not_null($random_product['specials_new_products_price'])) {
$whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><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']));
}
$info_box_contents = array();
$info_box_contents[] = array('align' => 'center', 'text' => '<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);
new infoBox($info_box_contents);
?>
</td>
</tr>
示例14: tep_db_query
$review_query = tep_db_query("select rd.reviews_text, r.reviews_rating, r.reviews_id, r.customers_name, r.date_added, r.reviews_read, p.products_id, p.products_price, p.products_tax_class_id, p.products_image, p.products_model, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where r.reviews_id = '" . (int) $_GET['reviews_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int) $languages_id . "' and r.products_id = p.products_id and p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int) $languages_id . "'");
$review = tep_db_fetch_array($review_query);
// BOF: MOD - Separate Pricing Per Customer
if (!tep_session_is_registered('sppc_customer_group_id')) {
$customer_group_id = '0';
} else {
$customer_group_id = $sppc_customer_group_id;
}
if ($customer_group_id != '0') {
$customer_group_price_query = tep_db_query("select customers_group_price from " . TABLE_PRODUCTS_GROUPS . " where products_id = '" . $review['products_id'] . "' and customers_group_id = '" . $customer_group_id . "' and customers_group_price != null");
if ($customer_group_price = tep_db_fetch_array($customer_group_price_query)) {
$review['products_price'] = $customer_group_price['customers_group_price'];
}
}
// EOF: MOD - Separate Pricing Per Customer
if ($new_price = tep_get_products_special_price($review['products_id'])) {
$products_price = '<span style="text-decoration:line-through">' . $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id'])) . '</span> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($review['products_tax_class_id'])) . '</span>';
} else {
$products_price = $currencies->display_price($review['products_price'], tep_get_tax_rate($review['products_tax_class_id']));
}
if (tep_not_null($review['products_model'])) {
$products_name = $review['products_name'] . '<br><span class="smallText">[' . $review['products_model'] . ']</span>';
} else {
$products_name = $review['products_name'];
}
require bts_select('language', FILENAME_PRODUCT_REVIEWS_INFO);
$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()));
$content = CONTENT_PRODUCT_REVIEWS_INFO;
$javascript = 'popup_window.js';
include bts_select('main');
// BTSv1.5
示例15: tep_get_tax_rate
$products_price .= '<span class="specialprice">';
$products_price .= $currencies->display_price($new_price, tep_get_tax_rate($random_product['products_tax_class_id']));
$products_price .= '</span>';
} else {
$products_price = '<span class="oldprice">';
$products_price .= $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$products_price .= '</span> ';
$products_price .= '<span class="specialprice">';
$products_price .= $currencies->display_price($discount_price['lowest']['price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$products_price .= '</span>';
}
} else {
$products_price = '<span class="oldprice">';
$products_price .= $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$products_price .= '</span> ';
$products_price .= '<span class="specialprice">';
$products_price .= $currencies->display_price($discount_price['lowest']['price'], tep_get_tax_rate($random_product['products_tax_class_id']));
$products_price .= '</span>';
}
} else {
if ($new_price = tep_get_products_special_price($random_product['products_id'])) {
$products_price = '<span class="oldprice">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span> <span class="specialprice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
$products_price = '<span class="yourprice">' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
}
}
if (CanShop() == 'true') {
echo $products_price;
}
echo '</div>';
}