本文整理汇总了PHP中oos_get_products_name函数的典型用法代码示例。如果您正苦于以下问题:PHP oos_get_products_name函数的具体用法?PHP oos_get_products_name怎么用?PHP oos_get_products_name使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了oos_get_products_name函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: str_replace
$_SESSION['cart']->remove($_POST['products_id'][$i]);
} else {
if (DECIMAL_CART_QUANTITY == '1') {
$_POST['cart_quantity'][$i] = str_replace(',', '.', $_POST['cart_quantity'][$i]);
}
$products_order_min = oos_get_products_quantity_order_min($_POST['products_id'][$i]);
$products_order_units = oos_get_products_quantity_order_units($_POST['products_id'][$i]);
if ($_POST['cart_quantity'][$i] >= $products_order_min) {
if ($_POST['cart_quantity'][$i] % $products_order_units == 0) {
$attributes = $_POST['id'][$_POST['products_id'][$i]] ? $_POST['id'][$_POST['products_id'][$i]] : '';
$_SESSION['cart']->add_cart($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, false, $_POST['to_wl_id'][$i]);
} else {
$_SESSION['error_cart_msg'] = trim($_SESSION['error_cart_msg']) . '<br />' . trim(oos_image(OOS_IMAGES . 'pixel_trans.gif', '', '11', '10') . $aLang['error_products_quantity_order_min_text'] . ' ' . oos_get_products_name($_POST['products_id'][$i]) . ' - ' . $aLang['error_products_units_invalid'] . ' ' . $_POST['cart_quantity'][$i] . ' - ' . $aLang['products_order_qty_unit_text_cart'] . ' ' . $products_order_units);
}
} else {
$_SESSION['error_cart_msg'] = trim($_SESSION['error_cart_msg']) . '<br />' . trim(oos_image(OOS_IMAGES . 'pixel_trans.gif', '', '11', '10') . $aLang['error_products_quantity_order_min_text'] . ' ' . oos_get_products_name($_POST['products_id'][$i]) . ' - ' . $aLang['error_products_quantity_invalid'] . ' ' . $_POST['cart_quantity'][$i] . ' - ' . $aLang['products_order_qty_min_text_cart'] . ' ' . $products_order_min);
}
}
}
$_SESSION['navigation']->remove_last_page();
MyOOS_CoreApi::redirect(oos_href_link($goto_file, oos_get_all_get_parameters($parameters), 'NONSSL'));
break;
case 'add_product':
// customer adds a product from the products page
if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) {
if (isset($_POST['edit_product'])) {
$_SESSION['cart']->remove($_POST['edit_product']);
}
$real_ids = $_POST['id'];
// File_upload
if (isset($_POST['number_of_uploads']) && is_numeric($_POST['number_of_uploads']) && $_POST['number_of_uploads'] > 0) {
示例2: intval
$sql = "SELECT p.products_id, p.products_image
FROM $orders_productstable opa,
$orders_productstable opb,
$orderstable o,
$productstable p
WHERE opa.products_id = '" . intval($nProductsId) . "'
AND opa.orders_id = opb.orders_id
AND opb.products_id != '" . intval($nProductsId) . "'
AND opb.products_id = p.products_id
AND opb.orders_id = o.orders_id
AND p.products_status >= '1'
AND (p.products_access = '0' OR p.products_access = '" . intval($nGroupID) . "')
GROUP BY p.products_id
ORDER BY o.date_purchased DESC";
$orders_result = $dbconn->SelectLimit($sql, MAX_DISPLAY_ALSO_PURCHASED);
$num_products_ordered = $orders_result->RecordCount();
if ($num_products_ordered >= MIN_DISPLAY_ALSO_PURCHASED) {
while ($orders = $orders_result->fields)
{
$aPurchased[] = array('products_name' => oos_get_products_name($orders['products_id']),
'products_id' => $orders['products_id'],
'products_image' => $orders['products_image']);
// Move that ADOdb pointer!
$orders_result->MoveNext();
}
}
}
示例3: array_merge
$products_name = $products_name_result->fields;
$reviewstable = $oostable['reviews'];
$reviews_average_result = $dbconn->Execute("SELECT (avg(reviews_rating) / 5 * 100) as average_rating FROM {$reviewstable} WHERE products_id = '" . $reviews['products_id'] . "'");
$reviews_average = $reviews_average_result->fields;
$review_info = array_merge($reviews_text, $reviews_average, $products_name);
$rInfo_array = array_merge($reviews, $review_info, $products_image);
$rInfo = new objectInfo($rInfo_array);
}
if (isset($rInfo) && is_object($rInfo) && $reviews['reviews_id'] == $rInfo->reviews_id) {
echo ' <tr class="dataTableRowSelected" onmouseover="this.style.cursor=\'hand\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=preview') . '\'">' . "\n";
} else {
echo ' <tr class="dataTableRow" onmouseover="this.className=\'dataTableRowOver\';this.style.cursor=\'hand\'" onmouseout="this.className=\'dataTableRow\'" onclick="document.location.href=\'' . oos_href_link_admin($aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id']) . '\'">' . "\n";
}
?>
<td class="dataTableContent"><?php
echo '<a href="' . oos_href_link_admin($aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id'] . '&action=preview') . '">' . oos_image(OOS_IMAGES . 'icons/preview.gif', ICON_PREVIEW) . '</a> ' . oos_get_products_name($reviews['products_id']);
?>
</td>
<td class="dataTableContent" align="right"><?php
echo oos_image(OOS_HTTP_SERVER . OOS_SHOP . OOS_IMAGES . 'stars_' . $reviews['reviews_rating'] . '.gif');
?>
</td>
<td class="dataTableContent" align="right"><?php
echo oos_date_short($reviews['date_added']);
?>
</td>
<td class="dataTableContent" align="right"><?php
if (isset($rInfo) && is_object($rInfo) && $reviews['reviews_id'] == $rInfo->reviews_id) {
echo oos_image(OOS_IMAGES . 'icon_arrow_right.gif');
} else {
echo '<a href="' . oos_href_link_admin($aFilename['reviews'], 'page=' . $_GET['page'] . '&rID=' . $reviews['reviews_id']) . '">' . oos_image(OOS_IMAGES . 'icon_information.gif', IMAGE_ICON_INFO) . '</a>';
示例4: objectInfo
$product = $product_result->fields;
$pInfo = new objectInfo($product);
$products_image_name = $pInfo->products_image;
$products_subimage1_name = $pInfo->products_subimage1;
$products_subimage2_name = $pInfo->products_subimage2;
$products_subimage3_name = $pInfo->products_subimage3;
$products_subimage4_name = $pInfo->products_subimage4;
$products_subimage5_name = $pInfo->products_subimage5;
$products_subimage6_name = $pInfo->products_subimage6;
}
$form_action = $_GET['pID'] ? 'update_product' : 'insert_product';
echo oos_draw_form($form_action, $aFilename['products'], 'categories=' . $categories . '&pID=' . $_GET['pID'] . '&action=' . $form_action, 'post', 'enctype="multipart/form-data"');
$languages = oos_get_languages();
for ($i = 0, $n = count($languages); $i < $n; $i++) {
if (isset($_GET['read']) && $_GET['read'] == 'only') {
$pInfo->products_name = oos_get_products_name($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_description = oos_get_products_description($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_description_meta = oos_get_products_description_meta($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_keywords_meta = oos_get_products_keywords_meta($pInfo->products_id, $languages[$i]['id']);
$pInfo->products_url = oos_get_products_url($pInfo->products_id, $languages[$i]['id']);
} else {
$pInfo->products_name = oos_db_prepare_input($products_name[$languages[$i]['id']]);
$pInfo->products_description = oos_db_prepare_input($_POST['products_description_' . $languages[$i]['id']]);
$pInfo->products_description_meta = oos_db_prepare_input($_POST['products_description_meta_' . $languages[$i]['id']]);
$pInfo->products_keywords_meta = oos_db_prepare_input($_POST['products_keywords_meta_' . $languages[$i]['id']]);
$pInfo->products_url = oos_db_prepare_input($products_url[$languages[$i]['id']]);
}
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
示例5: oos_href_link_admin
}
if (!$_GET['search']) {
echo '<a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&action=new_category') . '">' . oos_image_swap_button('newcategorie', 'new_category_off.gif', IMAGE_NEW_CATEGORY) . '</a> <a href="' . oos_href_link_admin($aFilename['products'], 'categories=' . $categories . '&action=new_product') . '">' . oos_image_swap_button('newprodukt', 'new_product_off.gif', IMAGE_NEW_PRODUCT) . '</a>';
}
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<?php
$heading = array();
$contents = array();
switch ($action) {
case 'slave_products':
$heading[] = array('text' => '<b>' . oos_get_products_name($pInfo->products_id, $_SESSION['language_id']) . '</b>');
$contents = array('form' => oos_draw_form('new_slave_product', $aFilename['categories'], 'action=new_slave_product&categories=' . $categories . '&pID=' . $pInfo->products_id, 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => '<br />' . TEXT_ADD_SLAVE_PRODUCT . '<br />' . oos_draw_input_field('slave_product_id', '', 'size="10"'));
$contents[] = array('align' => 'center', 'text' => '<br />' . oos_image_swap_submits('save', 'save_off.gif', IMAGE_SAVE) . ' <a href="' . oos_href_link_admin($aFilename['categories'], 'categories=' . $categories . '&pID=' . $pInfo->products_id) . '">' . oos_image_swap_button('cancel', 'cancel_off.gif', IMAGE_CANCEL) . '</a>');
$contents[] = array('text' => '<br />' . TEXT_CURRENT_SLAVE_PRODUCTS);
$slave_table_result = $dbconn->Execute("SELECT p2m.master_id, p2m.slave_id FROM " . $oostable['products_to_master'] . " p2m WHERE master_id = '" . $pInfo->products_id . "'");
while ($slave_table = $slave_table_result->fields) {
$slave_products_result = $dbconn->Execute("SELECT p.products_id, p.products_slave_visible, pd.products_name FROM " . $oostable['products'] . " p , " . $oostable['products_description'] . " pd WHERE p.products_id = pd.products_id AND p.products_id = '" . $slave_table['slave_id'] . "' AND pd.products_languages_id = '" . intval($_SESSION['language_id']) . "' ORDER BY pd.products_name LIMIT 1");
$slave_products = $slave_products_result->fields;
if ($slave_products['products_slave_visible'] == 1) {
$contents[] = array('text' => ' ' . $slave_products['products_name'] . ' ' . '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_all_get_params(array('action', 'pID')) . 'slave_id=' . $slave_table['slave_id'] . '&master_id=' . $pInfo->products_id . '&action=slave_delete') . '">' . oos_image(OOS_IMAGES . 'delete_slave_off.gif', 'Delete Slave') . '</a>' . '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_all_get_params(array('action')) . 'visible=0&slave_id=' . $slave_table['slave_id'] . '&master_id=' . $pInfo->products_id . '&action=slave_visible') . '">' . oos_image(OOS_IMAGES . 'icon_status_green.gif', IMAGE_ICON_STATUS_RED_LIGHT) . '</a>');
} else {
$contents[] = array('text' => ' ' . $slave_products['products_name'] . ' ' . '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_all_get_params(array('action', 'pID')) . 'slave_id=' . $slave_table['slave_id'] . '&master_id=' . $pInfo->products_id . '&action=slave_delete') . '">' . oos_image(OOS_IMAGES . 'delete_slave_off.gif', 'Delete Slave') . '</a>' . '<a href="' . oos_href_link_admin($aFilename['categories'], oos_get_all_get_params(array('action')) . 'visible=1&slave_id=' . $slave_table['slave_id'] . '&master_id=' . $pInfo->products_id . '&action=slave_visible') . '">' . oos_image(OOS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_GREEN_LIGHT) . '</a>');
}
// Move that ADOdb pointer!
$slave_table_result->MoveNext();
示例6: oos_black_line
<td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_NAME; ?> </td>
<td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_OPT_VALUE; ?> </td>
<td class="dataTableHeadingContent"> <?php echo TABLE_HEADING_SORT_ORDER_VALUE; ?> </td>
<td class="dataTableHeadingContent" align="right"> <?php echo TABLE_HEADING_OPT_PRICE; ?> </td>
<td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_OPT_PRICE_PREFIX; ?> </td>
<td class="dataTableHeadingContent" align="center"> <?php echo TABLE_HEADING_ACTION; ?> </td>
</tr>
<tr>
<td colspan="8"><?php echo oos_black_line(); ?></td>
</tr>
<?php
$next_id = 1;
$rows = 0;
$attributes = $dbconn->Execute($attributes);
while ($attributes_values = $attributes->fields) {
$products_name_only = oos_get_products_name($attributes_values['products_id']);
$options_name = oos_options_name($attributes_values['options_id']);
$values_name = oos_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') && ($_GET['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 echo $attributes_values['products_attributes_id']; ?>"> </td>
<td class="smallText"> <select name="products_id">
<?php
$productstable = $oostable['products'];
$products_descriptiontable = $oostable['products_description'];
$products = $dbconn->Execute("SELECT p.products_id, pd.products_name FROM $productstable p, $products_descriptiontable pd WHERE pd.products_id = p.products_id AND pd.products_languages_id = '" . intval($_SESSION['language_id']) . "' ORDER BY pd.products_name");
while($products_values = $products->fields) {
示例7: defined
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if (!$oEvent->installed_plugin('notify')) {
return false;
}
$notifications_block = '0';
if (isset($_GET['products_id'])) {
if (!isset($nProductsId)) {
$nProductsId = oos_get_product_id($_GET['products_id']);
}
$notifications_block = '1';
if (!isset($block_get_parameters)) {
$block_get_parameters = oos_get_all_get_parameters(array('action'));
$block_get_parameters = oos_remove_trailing($block_get_parameters);
$oSmarty->assign('get_params', $block_get_parameters);
}
if (isset($_SESSION['customer_id'])) {
$products_notificationstable = $oostable['products_notifications'];
$query = "SELECT COUNT(*) AS total\n FROM {$products_notificationstable}\n WHERE products_id = '" . intval($nProductsId) . "'\n AND customers_id = '" . intval($_SESSION['customer_id']) . "'";
$check = $dbconn->Execute($query);
$notification_exists = $check->fields['total'] > 0 ? true : false;
} else {
$notification_exists = false;
}
$products_name = oos_get_products_name($nProductsId);
$oSmarty->assign(array('notification_exists' => $notification_exists, 'products_name' => $products_name, 'block_heading_notifications' => $block_heading));
}
$oSmarty->assign('notifications_block', $notifications_block);
示例8: Copyright
Copyright (c) 2003 osCommerce
----------------------------------------------------------------------
Released under the GNU General Public License
---------------------------------------------------------------------- */
/** ensure this file is being included by a parent file */
defined('OOS_VALID_MOD') or die('Direct Access to this location is not allowed.');
if ($oEvent->installed_plugin('customer_must_login')) {
return false;
}
$whats_new_block = '0';
$productstable = $oostable['products'];
$query = "SELECT products_id, products_image, products_tax_class_id, products_units_id, products_price,\n products_base_price, products_base_unit, products_discount_allowed\n FROM {$productstable}\n WHERE products_status >= '1'\n AND (products_access = '0' OR products_access = '" . intval($nGroupID) . "')\n ORDER BY products_date_added DESC";
if ($random_product = oos_random_select($query, MAX_RANDOM_SELECT_NEW)) {
$whats_new_block = '1';
$random_product['products_name'] = oos_get_products_name($random_product['products_id']);
$whats_new_product_price = '';
$whats_new_product_special_price = '';
$whats_new_max_product_discount = 0;
$whats_new_product_discount_price = '';
$whats_new_base_product_price = '';
$whats_new_base_product_special_price = '';
$whats_new_special_price = '';
if ($_SESSION['member']->group['show_price'] == 1) {
$whats_new_special_price = oos_get_products_special_price($random_product['products_id']);
$whats_new_product_price = $oCurrencies->display_price($random_product['products_price'], oos_get_tax_rate($random_product['products_tax_class_id']));
if (oos_is_not_null($whats_new_product_price)) {
$whats_new_product_special_price = $oCurrencies->display_price($whats_new_special_price, oos_get_tax_rate($random_product['products_tax_class_id']));
} else {
$whats_new_max_product_discount = min($random_product['products_discount_allowed'], $_SESSION['member']->group['discount']);
if ($whats_new_max_product_discount != 0) {