本文整理汇总了PHP中get_product_name函数的典型用法代码示例。如果您正苦于以下问题:PHP get_product_name函数的具体用法?PHP get_product_name怎么用?PHP get_product_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_product_name函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_grid_archive_theme
/**
* Returns classic grid element for a given product
*
* @param object $post Product post object
* @param string $archive_template
* @return string
*/
function get_grid_archive_theme($post, $archive_template = null)
{
$archive_template = isset($archive_template) ? $archive_template : get_product_listing_template();
$return = '';
if ($archive_template == 'grid') {
$image_id = get_post_thumbnail_id($post->ID);
$thumbnail_product = wp_get_attachment_image_src($image_id, 'classic-grid-listing');
$product_name = get_product_name();
if ($thumbnail_product) {
$img_class['alt'] = $product_name;
$img_class['class'] = 'classic-grid-image';
$image = wp_get_attachment_image($image_id, 'classic-grid-listing', false, $img_class);
} else {
$url = default_product_thumbnail_url();
$image = '<img src="' . $url . '" class="classic-grid-image" alt="' . $product_name . '" >';
}
$archive_price = apply_filters('archive_price_filter', '', $post);
$classic_grid_settings = get_classic_grid_settings();
$row_class = get_row_class($classic_grid_settings);
$return = '<div class="archive-listing product-' . $post->ID . ' classic-grid ' . $row_class . ' ' . product_class($post->ID) . '">';
$return .= '<a href="' . get_permalink() . '">';
//$return .= '<div style="background-image:url(\'' . $url . '\');" class="classic-grid-element"></div>';
$return .= '<div class="classic-grid-image-wrapper"><div class="pseudo"></div><div class="image">' . $image . '</div></div>';
$return .= '<h3 class="product-name">' . $product_name . '</h3>' . $archive_price . '</a></div>';
}
return $return;
}
示例2: check_firmware_version
function check_firmware_version()
{
global $g;
$post = "platform=" . rawurlencode($g['fullplatform']) . "&version=" . rawurlencode(get_product_version());
$rfd = @fsockopen("www." . get_product_url(), 80, $errno, $errstr, 3);
if ($rfd) {
$hdr = "POST /checkversion.php HTTP/1.0\r\n";
$hdr .= "Content-Type: application/x-www-form-urlencoded\r\n";
$hdr .= "User-Agent: " . get_product_name() . "-webGUI/1.0\r\n";
$hdr .= "Host: " . get_product_url() . "\r\n";
$hdr .= "Content-Length: " . strlen($post) . "\r\n\r\n";
fwrite($rfd, $hdr);
fwrite($rfd, $post);
$inhdr = true;
$resp = "";
while (!feof($rfd)) {
$line = fgets($rfd);
if ($inhdr) {
if (trim($line) === "") {
$inhdr = false;
}
} else {
$resp .= $line;
}
}
fclose($rfd);
return $resp;
}
return null;
}
示例3: ydf_excel
public function ydf_excel($date = NULL)
{
header("Content-Type: text/html; charset=gb2312");
if ($date == NULL) {
$date = date('Y-m-d');
}
$orders = $this->get_ydf_order($date);
$head = array('Sales Record Number', 'Buyer Fullname', 'Buyer Company', 'Buyer Address 1', 'Buyer Address 2', 'Buyer City', 'Buyer State', 'Buyer Zip', 'Buyer Phone Number', 'Buyer Country', 'Custom Label', 'Description EN', 'Description CN', 'HS Code', 'Quantity', 'Sale Price', 'Country of Manufacture', 'Mark', 'weight', 'Length', 'Width', 'Height', 'Shipping Service', 'Shipping Service Name', 'Track Number');
foreach ($orders as $order) {
$skus = explode(',', $order->sku_str);
$qties = explode(',', $order->qty_str);
$shipping_method = shipping_method($order->is_register);
//echo $order->id."<br>";
$count = count($skus);
$product_name = '';
$product_name_en = '';
$qty = 0;
$weight = 0;
$rmb = price($this->order_model->calc_currency($order->currency, $order->gross));
for ($i = 0; $i < $count; $i++) {
if ($i == 0) {
$product_name .= iconv("UTF-8", "GB2312//IGNORE", get_product_name($skus[$i]));
$product_name_en .= iconv("UTF-8", "GB2312//IGNORE", get_product_name_en($skus[$i]));
}
$qty += $qties[$i];
$weight += get_weight_by_sku($skus[$i]) * $skus[$i];
}
$shipping_method_name_cn = iconv("UTF-8", "GB2312//IGNORE", $shipping_method->name_cn);
$data[] = array($order->id, $order->name, " ", $order->address_line_1, $order->address_line_2, $order->town_city, $order->state_province, $order->zip_code, $order->contact_phone_number, $order->country, $skus[0], $product_name_en, $product_name, " ", $qty, $rmb, " ", " ", $weight, " ", " ", " ", $shipping_method->ydf_code, $shipping_method_name_cn, $order->track_number);
}
$this->excel->array_to_excel($data, $head, 'ydf_list_' . $date);
}
示例4: say_hello
function say_hello()
{
output_api_header();
echo "<response>\n";
echo " <status>0</status>\n";
echo " <message>OK</message>\n";
echo " <product>" . get_product_name() . "</product>\n";
echo " <version>" . get_product_version() . "</version>\n";
echo "</response>\n";
exit;
}
示例5: get_list_archive_theme
function get_list_archive_theme($post, $archive_template = null)
{
$archive_template = isset($archive_template) ? $archive_template : get_product_listing_template();
$return = '';
if ($archive_template == 'list') {
$thumbnail_product = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'classic-list-listing');
if ($thumbnail_product) {
$url = $thumbnail_product[0];
} else {
$url = default_product_thumbnail_url();
}
$product_name = get_product_name();
$return = '<div class="archive-listing product-' . $post->ID . ' list ' . product_class($post->ID) . '">';
$return .= '<a href="' . get_permalink() . '"><span class="div-link"></span></a>';
$return .= '<div class="classic-list-image-wrapper"><div class="pseudo"></div><img src="' . $url . '" class="classic-list-image" alt="' . $product_name . '" ></div>';
$return .= '<div class="product-name">' . $product_name . '</div>';
$return .= '<div class="product-short-descr"><p>' . c_list_desc($post->ID) . '</p></div></div>';
}
return $return;
}
示例6: gettext
</tr>
<?php
} else {
?>
<tr>
<td class="list" colspan="3" height="10"></td>
</tr>
<?php
}
?>
</table>
<div id="submit">
<input name="Submit" type="submit" class="formbtn" value="<?php
echo gettext("Save");
?>
" />
</div>
<div id="remarks">
<?php
html_remark("warning", gettext("Warning"), sprintf(gettext("After you click "Save", you must reboot %s to make the changes take effect. You may also have to do one or more of the following steps before you can access your NAS again: <ul><li><span class='vexpl'>change the IP address of your computer</span></li><li><span class='vexpl'>access the webGUI with the new IP address</span></li></ul>"), get_product_name()));
?>
</div>
<?php
include "formend.inc";
?>
</form>
</td>
</tr>
</table>
<?php
include "fend.inc";
示例7: foreach
.sty1{ width:20px; height:20px; border:1px solid #000000; font-size:20px; font-weight:bold; float:right;}
</style>
</head>
<body>
TEXT;
$i = 0;
foreach ($orders as $order) {
foreach ($order as $order) {
$i++;
$sku_arr = explode(',', $order->sku_str);
$ship_confirm_date = date('Y-m-d', strtotime($order->ship_confirm_date));
$ship_weight = "{$order->ship_weight}" / 1000 . 'Kg';
$shipping_cost = '¥' . "{$order->shipping_cost}";
$product_names = '';
foreach ($sku_arr as $sku) {
$product_names .= get_product_name($sku) . '(' . get_product_name_en($sku) . ')' . br();
}
if ($i != 1) {
$page = <<<TEXT
<div style="margin-left:auto; margin-right:auto; width : 210mm; height:303mm; clear:both; page-break-before: always;">
TEXT;
} else {
$page = <<<TEXT
<div style="margin-left:auto; margin-right:auto; width : 210mm; height:303mm; clear:both;">
TEXT;
}
$html .= <<<TEXT
{$page}
\t<table width="100%" style="height:35mm;" border="0" cellspacing="0" cellpadding="0">
<tr>
<td style=" width:105mm;font-size:12px;">
示例8: gettext
<?php
echo gettext("Daemon events");
?>
<br />
</td>
</tr>
</table>
<div id="submit">
<input name="Submit" type="submit" class="formbtn" value="<?php
echo gettext("Save");
?>
" onclick="enable_change(true)" />
</div>
<div id="remarks">
<?php
html_remark("note", gettext("Note"), sprintf(gettext("Syslog sends UDP datagrams to port 514 on the specified remote syslog server. Be sure to set syslogd on the remote server to accept syslog messages from %s."), get_product_name()));
?>
</div>
<?php
include "formend.inc";
?>
</form>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
enable_change(false);
//-->
</script>
<?php
示例9: system_get_cpu_info
$hr = "";
//Set horizontal line
$bs = "";
//Set bold start
$be = "";
//Set bold end
$cs = "Error or code:";
//Set code end
$ce = "";
//Set code end
// Get system and hardware informations
$cpuinfo = system_get_cpu_info();
$meminfo = system_get_ram_info();
$hwinfo = trim(exec("/sbin/sysctl -a | /usr/bin/awk -F:\\ '/controller|interface/ &&! /AT|VGA|Key|inet|floppy/{!u[\$2]++}END{for(i in u) a=a OFS i;print a}'"));
mwexec2("sysctl -n dev.acpi.0.%desc", $mbinfo);
$sys_summary = sprintf("%s %s (revision %s) %s; %s %s %sMiB RAM", get_product_name(), get_product_version(), get_product_revision(), get_platform_type(), $mbinfo[0], $cpuinfo['model'], round($meminfo['real'] / 1024 / 1024));
?>
<form action="<?php
echo $_SERVER['SCRIPT_NAME'];
?>
" method="post" enctype="multipart/form-data" name="iform">
<table>
<tr>
<td class="label" align="right"><?php
echo gettext("Info");
?>
</td>
<td class="text" align="left"><?php
echo $sys_summary;
?>
</td>
示例10: array
}
}
}
}
}
$item_sku_html .= '<div style="margin: 5px;">';
$config = array('name' => 'item_id_' . $order->id . '_' . $i, 'id' => 'item_id_' . $order->id . '_' . $i, 'value' => !empty($order->invoice_number) ? $order->invoice_number : element($i, $item_ids), 'maxlength' => '20', 'size' => '10', 'readonly' => TRUE);
$item_sku_html .= '<a target="_blank" href="' . $ebay_url . element($i, $item_ids) . '">' . wrap_color('Item ID', 'red', in_array($skus[$i], $waiting_skus)) . '</a>: ' . form_input($config);
$config = array('name' => 'sku_' . $order->id . '_' . $i, 'id' => 'sku_' . $order->id . '_' . $i, 'value' => isset($skus[$i]) ? $skus[$i] : '', 'maxlength' => '20', 'size' => '8');
$item_sku_html .= wrap_color(' SKU: ', 'red', in_array($skus[$i], $waiting_skus)) . form_input($config);
$config = array('name' => 'qty_' . $order->id . '_' . $i, 'id' => 'qty_' . $order->id . '_' . $i, 'value' => isset($qties[$i]) ? $qties[$i] : '', 'maxlength' => '8', 'size' => '6');
if (isset($skus[$i])) {
if (!$this->product_model->fetch_product_id(strtoupper($skus[$i]))) {
$product_name .= wrap_color($skus[$i], 'blue', !$this->product_model->fetch_product_id(strtoupper($skus[$i]))) . ': ' . get_product_name($skus[$i]) . '<br/>';
} else {
$product_name .= $skus[$i] . ': ' . get_product_name($skus[$i]) . '<br/>';
}
}
if (strlen(element($i, $item_ids)) == 12) {
$salesrecordnumber = 'SRN:' . get_salesrecordnumber($order->transaction_id, element($i, $item_ids), $skus[$i]);
} else {
$salesrecordnumber = '';
}
$item_sku_html .= ' Qty: ' . form_input($config) . $salesrecordnumber . "<img width=120 height=120 src='" . $img_url . "'> {$delete_span} ";
if ($i == $count - 1) {
$item_sku_html .= $this->block->generate_add_icon_only("add_item('{$base_url}', {$order->id});");
}
$item_sku_html .= '</div>';
}
$item_sku_html .= '</div>';
$shipping_type = lang('shipping_way') . ': ';
示例11: lang
$row[] = $readable_time['days'] . lang('day') . $readable_time['hours'] . lang('hour');
$item_info = <<<ITEM
<div style='padding: 10px;'>
{$order->item_no}<br/>
</div>
ITEM;
$row[] = $item_info;
$skus = explode(',', $order->sku_str);
$qties = explode(',', $order->qty_str);
$count = count($skus);
$item_sku_html = '';
for ($i = 0; $i < $count; $i++) {
if (isset($product_names[$skus[$i]])) {
$product_name = $product_names[$skus[$i]];
} else {
$product_name = get_product_name($skus[$i]);
$product_names[$skus[$i]] = $product_name;
}
$item_sku_html .= '<div style="margin: 5px;">';
$item_sku_html .= $skus[$i] . '【' . $product_name . '】';
$item_sku_html .= ' Qty: ' . $qties[$i];
$item_sku_html .= '</div>';
}
$item_sku_html .= '</div>';
$product_info = <<<PRODUCT
<div style='padding: 10px;'>
{$item_sku_html}<br/>
</div>
PRODUCT;
$row[] = $product_info;
$name = lang('receiver');
示例12: approved_resending_orders
function approved_resending_orders()
{
$CI =& get_instance();
$CI->load->model('order_model');
$login_name = get_current_login_name();
$type = array('not_received_approved_resending', 'received_approved_resending');
$orders = $CI->order_model->fetch_default_orders($login_name, $type);
$url = site_url('order/regular_order/view_order');
$head = array(lang('item_information'), lang('product_information'), lang('gathering_transaction_remark'), lang('shipping_info'), lang('order_status'), lang('import_date') . anchor($url, lang('add_more'), array('style' => 'float:right;')));
$data = array();
$ebay_url = 'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=';
$statuses = fetch_statuses('order_status');
$purchasers = array();
foreach ($orders as $order) {
$row = array();
$gross = empty($order->gross) ? $order->net : $order->gross;
$rmb = price($CI->order_model->calc_currency($order->currency, $gross));
$lang_name = lang('name_en');
$lang_address = lang('address_en');
$lang_town_city = lang('town_city_en');
$lang_state_province = lang('state_province_en');
$lang_countries = lang('country_en');
$lang_zip_code = lang('postal_code_en');
$name = $order->name . (empty($order->buyer_id) ? '' : "({$order->buyer_id})");
$phone = '';
if (!empty($order->contact_phone_number)) {
$phone = lang('phone') . ':';
$phone .= $order->contact_phone_number;
}
$item_info = <<<ITEM
<div style='padding: 10px;'>
{$order->item_no}<br/>
{$lang_name} : {$name} <br/>
{$lang_address} : {$order->address_line_1} {$order->address_line_2}<br/>
{$lang_town_city} :{$order->town_city}<br/>
{$lang_state_province} : {$order->state_province}<br/>
{$lang_countries} :{$order->country}<br/>
{$lang_zip_code} : {$order->zip_code}<br/>
{$phone}
</div>
ITEM;
$row[] = $item_info;
$item_ids = explode(',', $order->item_id_str);
$skus = explode(',', $order->sku_str);
$qties = explode(',', $order->qty_str);
$count = count($skus);
$item_sku_html = '';
$product_name = '';
$item_sku_html .= "<div id='item_div_{$order->id}'>";
for ($i = 0; $i < $count; $i++) {
$item_id = element($i, $item_ids);
if (strlen($item_id) == 12) {
$link = '<a target="_blank" href="' . $ebay_url . $item_id . '">' . $item_id . '</a>';
} else {
$link = $item_id;
}
$item_sku_html .= '<div style="margin-top: 5px;">';
if ($item_id) {
$item_sku_html .= "Item ID: {$link}<br/>";
}
$purchaser_name = '';
if (isset($purchasers[$skus[$i]])) {
$purchaser_name = $purchasers[$skus[$i]];
} else {
$purchaser_name = get_purchaser_name_by_sku($skus[$i]);
$purchasers[$skus[$i]] = $purchaser_name;
}
$item_sku_html .= ' SKU: ' . (isset($skus[$i]) ? $skus[$i] . ' * ' . element($i, $qties) . ' (' . get_product_name($skus[$i]) . ')' : '') . ' ' . $purchaser_name . '<br/>';
$item_sku_html .= '</div>';
}
$item_sku_html .= '</div>';
$shipping_type = lang('shipping_way') . ': ';
$shipping_type .= $order->is_register;
$item_title_str = str_replace(',', '<br/>', $order->item_title_str);
$product_info = <<<PRODUCT
<div style='padding: 10px;'>
{$item_title_str}<br/>
{$item_sku_html}
</div>
PRODUCT;
$status_name = $CI->order_model->fetch_status_name('order_status', $order->order_status);
$order_status_arr = array('not_received_apply_for_partial_refund', 'not_received_apply_for_full_refund', 'received_apply_for_partial_refund', 'received_apply_for_full_refund', 'not_received_apply_for_resending', 'received_apply_for_resending');
if (isset($power) && $power >= 2 && in_array($status_name, $order_status_arr)) {
$anchor = anchor(site_url('order/special_order/view_return_order', array($order->item_no, 'auditing')), lang('pending') . '>>');
}
$make_pi_html = '';
if (true) {
$anchor = anchor(site_url('order/special_order/view_return_order', array($order->item_no)), lang('make_pi') . '>>');
$make_pi_html = form_label($anchor);
$make_pi_html .= '<br/>';
}
$status_nrar = $CI->order_model->fetch_status_id('order_status', 'not_received_approved_resending');
$status_rar = $CI->order_model->fetch_status_id('order_status', 'received_approved_resending');
if ($order->order_status == $status_nrar || $order->order_status == $status_rar) {
$anchor = anchor(site_url('order/special_order/again', array($order->item_no)), lang('again') . '>>');
}
$row[] = $product_info;
$lang_remark = lang('remark');
$other_info = <<<OTHER
{$order->currency}: {$gross}, RMB : {$rmb}<br/><br/>
//.........这里部分代码省略.........
示例13: download_order_info
public function download_order_info()
{
$head = array(lang('item_number'), lang('ship_remark'), lang('customer_remark'), lang('is_register'), lang('track_number'), lang('total_weight'), lang('shipping_cost'), lang('total_cost'), lang('total_profit_rate'), lang('product_information'), lang('ship_confirm_date'), lang('receipt'), lang('transaction_number'), lang('input_user'), lang('cost_date'));
if (!$this->input->is_post()) {
return;
}
$order_ids_str = trim($this->input->post('order_ids_str'), ',');
if (empty($order_ids_str)) {
$content = lang('select_one_download');
echo "<script >alert('{$content}'); history.back();</script>";
return;
}
$order_ids = array();
foreach (explode(',', $order_ids_str) as $id) {
$order_ids[] = $id;
}
$orders = $this->accounting_cost_model->fetch_costs_by_cost_user_to_array($order_ids);
$show_data = array();
foreach ($orders as $order) {
$receipt = $order->currency . ' : ' . $order->net && $order->net != 0 ? $order->net : $order->gross;
$item_ids = explode(',', $order->item_id_str);
$skus = explode(',', $order->sku_str);
$qties = explode(',', $order->qty_str);
$item_title = explode(',', $order->item_title_str);
$product_cost_string = explode(',', $order->product_cost);
$count = count($skus);
$product_information = '';
$product_name = '';
$total_product_cost = 0;
for ($i = 0; $i < $count; $i++) {
$item_id = element($i, $item_ids);
$title = element($i, $item_title);
$product_information .= $title . ' ';
if ($item_id) {
$product_information .= "Item ID: {$item_id} ";
}
$purchaser_name = '';
if (isset($purchasers[$skus[$i]])) {
$purchaser_name = $purchasers[$skus[$i]];
} else {
$purchaser_name = get_purchaser_name_by_sku($skus[$i]);
$purchasers[$skus[$i]] = $purchaser_name;
}
$product_cost = get_cost_by_sku($skus[$i]);
if ($product_cost == 0) {
$product_cost = '';
}
$price_html = $product_cost;
if (element($i, $product_cost_string)) {
$cost = $product_cost_string[$i];
} else {
$cost = $product_cost;
}
// if(isset ($action) && $action =='cost_view_list')
// {
$price_html = $cost;
// }
$total_product_cost += $cost * element($i, $qties);
$product_information .= ' SKU: ' . (isset($skus[$i]) ? $skus[$i] . ' * ' . element($i, $qties) . ' (' . get_product_name($skus[$i]) . ')' : '') . ' ' . $purchaser_name . ' ' . lang('cost_price') . ' : ' . $price_html;
}
$default = isset($product_cost_string[$count]) ? $product_cost_string[$count] : '0.65';
$product_information .= ' ' . lang('other_cost_price') . ' : ' . $default;
$top = $order->product_cost_all == 0 ? $total_product_cost : $order->product_cost_all;
$product_information .= ' ' . lang('total_cost') . ' : ' . $top;
$show_data[] = array('item_number' => $order->item_no, 'ship_remark' => $order->ship_remark, 'customer_remark' => $order->descript, 'is_register' => $order->is_register, 'track_number' => $order->track_number, 'total_weight' => $order->ship_weight, 'shipping_cost' => $order->shipping_cost, 'total_cost' => $top, 'total_profit_rate' => $order->profit_rate, 'product_information' => $product_information, 'ship_confirm_date' => $order->ship_confirm_date, 'receipt' => $receipt . "({$order->currency})", 'transaction_number' => $order->transaction_id, 'input_user' => $order->input_user, 'cost_date' => $order->cost_date);
}
$this->excel->array_to_excel($show_data, $head, 'Order_info_' . date('Y-m-d'));
}
示例14: system_get_language_code
echo system_get_language_code();
?>
" lang="<?php
echo system_get_language_code();
?>
">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php
echo system_get_language_codeset();
?>
" />
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link href="gui.css" rel="stylesheet" type="text/css" />
<title><?php
echo get_product_name();
?>
</title>
<style type="text/css">
html,body {
height: 100%;
width: 100%;
}
</style>
</head>
<body onload='document.iform.username.focus();'>
<div id="loginpage">
<table height="100%" width="100%" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
示例15: isset
<input name="Submit" type="submit" class="formbtn" value="<?php
echo isset($uuid) && FALSE !== $cnid ? gettext("Save") : gettext("Add");
?>
" onclick="enable_change(true)" />
<input name="Cancel" type="submit" class="formbtn" value="<?php
echo gettext("Cancel");
?>
" />
<input name="uuid" type="hidden" value="<?php
echo $pconfig['uuid'];
?>
" />
</div>
<div id="remarks">
<?php
html_remark("warning", gettext("Warning"), sprintf(gettext("You can't mount the partition '%s' where the config file is stored.<br />"), htmlspecialchars($cfdevice)) . sprintf(gettext("UFS and variants are the NATIVE file format for FreeBSD (the underlying OS of %s). Attempting to use other file formats such as FAT, FAT32, EXT2, EXT3, or NTFS can result in unpredictable results, file corruption, and loss of data!"), get_product_name()));
?>
</div>
<?php
include "formend.inc";
?>
</form>
</td>
</tr>
</table>
<script type="text/javascript">
<!--
type_change();
<?php
if (isset($uuid) && FALSE !== $cnid) {
?>