本文整理汇总了PHP中zen_get_product_is_linked函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_product_is_linked函数的具体用法?PHP zen_get_product_is_linked怎么用?PHP zen_get_product_is_linked使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了zen_get_product_is_linked函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: zen_draw_hidden_field
</table></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td class="main" align="right"><?php
echo zen_draw_hidden_field('products_date_added', zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d')) . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
?>
</td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<?php
// show when product is linked
if (!empty($_GET['pID']) && zen_get_product_is_linked($_GET['pID']) == 'true') {
?>
<tr>
<td class="main"><?php
echo TEXT_MASTER_CATEGORIES_ID;
?>
</td>
<td class="main">
<?php
// echo zen_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id);
echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . ' ';
echo zen_draw_pull_down_menu('master_categories_id', zen_get_master_categories_pulldown($_GET['pID']), $pInfo->master_categories_id);
?>
</td>
</tr>
<tr>
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:collect_info.php
示例2: zen_draw_separator
<td><?php
echo zen_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
</tr>
<tr>
<td class="main" align="right"><?php
echo zen_draw_hidden_field('products_date_added', zen_not_null($pInfo->products_date_added) ? $pInfo->products_date_added : date('Y-m-d')) . zen_image_submit('button_preview.gif', IMAGE_PREVIEW) . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . (isset($_GET['pID']) ? '&pID=' . $_GET['pID'] : '') . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) && !empty($_GET['search']) ? '&search=' . $_GET['search'] : '') . (isset($_POST['search']) && !empty($_POST['search']) && empty($_GET['search']) ? '&search=' . $_POST['search'] : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>';
?>
</td>
</tr>
<tr>
<td><table border="0" cellspacing="0" cellpadding="2">
<?php
// show when product is linked
if (zen_get_product_is_linked($_GET['pID']) == 'true' and $_GET['pID'] > 0) {
?>
<tr>
<td class="main"><?php
echo TEXT_MASTER_CATEGORIES_ID;
?>
</td>
<td class="main">
<?php
// echo zen_draw_pull_down_menu('products_tax_class_id', $tax_class_array, $pInfo->products_tax_class_id);
echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . ' ';
echo zen_draw_pull_down_menu('master_category', zen_get_master_categories_pulldown($_GET['pID']), $pInfo->master_categories_id);
?>
</td>
</tr>
<?php
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:31,代码来源:collect_info.php
示例3: zen_draw_form
<?php
} else {
echo zen_draw_form('setflag_products', FILENAME_CATEGORIES, 'action=setflag&pID=' . $products->fields['products_id'] . '&cPath=' . $cPath . (isset($_GET['page']) ? '&page=' . $_GET['page'] : '') . (isset($_GET['search']) && !empty($_GET['search']) ? '&search=' . $_GET['search'] : ''));
?>
<input type="image" src="<?php
echo DIR_WS_IMAGES;
?>
icon_red_on.gif" title="<?php
echo IMAGE_ICON_STATUS_OFF;
?>
"/>
<input type="hidden" name="flag" value="1" />
</form>
<?php
}
if (zen_get_product_is_linked($products->fields['products_id']) == 'true') {
echo ' ' . zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . '<br>';
}
?>
</td>
<?php
if ($action == '') {
?>
<td class="dataTableContent" align="right"><?php
echo $products->fields['products_sort_order'];
?>
</td>
<td class="dataTableContent" align="right">
<?php
echo '<a href="' . zen_href_link($type_handler, 'cPath=' . $cPath . '&product_type=' . $products->fields['products_type'] . '&pID=' . $products->fields['products_id'] . '&action=new_product' . (isset($_GET['search']) ? '&search=' . $_GET['search'] : '')) . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . '</a>';
?>
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:category_product_listing.php
示例4: zen_get_products_to_categories
/**
* Return the number of products in a category
* TABLES: products, products_to_categories, categories
* syntax for count: zen_get_products_to_categories($categories->fields['categories_id'], true)
* syntax for linked products: zen_get_products_to_categories($categories->fields['categories_id'], true, 'products_active')
*/
function zen_get_products_to_categories($category_id, $include_inactive = false, $counts_what = 'products')
{
global $db;
$products_count = $cat_products_count = 0;
$products_linked = '';
if ($include_inactive == true) {
switch ($counts_what) {
case 'products':
$cat_products_query = "select count(*) as total\n from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n where p.products_id = p2c.products_id\n and p2c.categories_id = '" . (int) $category_id . "'";
break;
case 'products_active':
$cat_products_query = "select p.products_id\n from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n where p.products_id = p2c.products_id\n and p2c.categories_id = '" . (int) $category_id . "'";
break;
}
} else {
switch ($counts_what) {
case 'products':
$cat_products_query = "select count(*) as total\n from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n where p.products_id = p2c.products_id\n and p.products_status = 1\n and p2c.categories_id = '" . (int) $category_id . "'";
break;
case 'products_active':
$cat_products_query = "select p.products_id\n from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n where p.products_id = p2c.products_id\n and p.products_status = 1\n and p2c.categories_id = '" . (int) $category_id . "'";
break;
}
}
$cat_products = $db->Execute($cat_products_query);
switch ($counts_what) {
case 'products':
if (!$cat_products->EOF) {
$cat_products_count += $cat_products->fields['total'];
}
break;
case 'products_active':
while (!$cat_products->EOF) {
if (zen_get_product_is_linked($cat_products->fields['products_id']) == 'true') {
return $products_linked = 'true';
}
$cat_products->MoveNext();
}
break;
}
$cat_child_categories_query = "select categories_id\n from " . TABLE_CATEGORIES . "\n where parent_id = '" . (int) $category_id . "'";
$cat_child_categories = $db->Execute($cat_child_categories_query);
if ($cat_child_categories->RecordCount() > 0) {
while (!$cat_child_categories->EOF) {
switch ($counts_what) {
case 'products':
$cat_products_count += zen_get_products_to_categories($cat_child_categories->fields['categories_id'], $include_inactive);
break;
case 'products_active':
if (zen_get_products_to_categories($cat_child_categories->fields['categories_id'], true, 'products_active') == 'true') {
return $products_linked = 'true';
}
break;
}
$cat_child_categories->MoveNext();
}
}
switch ($counts_what) {
case 'products':
return $cat_products_count;
break;
case 'products_active':
return $products_linked;
break;
}
}
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:72,代码来源:general.php
示例5: zen_image
?>
</td>
</tr>
<tr>
<td colspan="3">
<table>
<?php
// show when product is linked
if (zen_get_product_is_linked($products_filter) == 'true') {
?>
<tr>
<td class="main" align="center" valign="bottom">
<?php
echo zen_image(DIR_WS_IMAGES . 'icon_yellow_on.gif', IMAGE_ICON_LINKED) . ' ' . TEXT_LEGEND_LINKED . ' ' . zen_get_product_is_linked($products_filter, 'true');
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main" align="center" valign="bottom">
<?php
if ($_GET['products_filter'] != '') {
echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . $current_category_id . '&pID=' . $products_filter . '&product_type=' . zen_get_products_type($products_filter)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '<br />' . TEXT_PRODUCT_EDIT . '</a>';
echo '</td><td class="main" align="center" valign="bottom">';
echo '<a href="' . zen_href_link(FILENAME_ATTRIBUTES_CONTROLLER, 'products_filter=' . $products_filter . '¤t_category_id=' . $current_category_id, 'NONSSL') . '">' . zen_image_button('button_edit_attribs.gif', IMAGE_EDIT_ATTRIBUTES) . '<br />' . TEXT_ATTRIBUTE_EDIT . '</a>' . ' ';
}
?>
开发者ID:dalinhuang,项目名称:cameras,代码行数:31,代码来源:image_handler.php
示例6: sprintf
?>
</td>
</tr>
<tr>
<td colspan="5" class="main" align="center"><?php
echo $action == '' ? '<span class="alert">' . TEXT_INFO_PREVIEW_ONLY . '</span>' : TEXT_INFO_UPDATE_REMINDER;
?>
</td>
</tr>
<?php
}
// master category linked
?>
<?php
if (zen_get_product_is_linked($products_filter) == 'false' and $pInfo->master_categories_id != zen_get_products_category_id($products_filter)) {
?>
<tr>
<!--- Dual Pricing start --->
<td colspan="8" class="main"><span class="alert">
<!--- Dual Pricing start --->
<?php
echo sprintf(TEXT_INFO_MASTER_CATEGORIES_ID_WARNING, $pInfo->master_categories_id, zen_get_products_category_id($products_filter));
?>
</span>
<br /><strong><?php
echo sprintf(TEXT_INFO_MASTER_CATEGORIES_ID_UPDATE_TO_CURRENT, $pInfo->master_categories_id, zen_get_products_category_id($products_filter));
?>
</strong>
</td>
</tr>
开发者ID:jeking928,项目名称:Dual-Pricing-2.1.6,代码行数:31,代码来源:products_price_manager.php
示例7: zen_get_products_to_categories
function zen_get_products_to_categories($category_id, $include_inactive = false, $counts_what = 'products')
{
global $gBitDb;
$products_count = 0;
$cat_products_count = 0;
if ($include_inactive == true) {
switch ($counts_what) {
case 'products':
$cat_products_query = "SELECT count(*) as `total`\n\t\t\t\t\t\t\t\t\t\t\t\t\t FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE p.`products_id` = p2c.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t and p2c.`categories_id` = '" . (int) $category_id . "'";
break;
case 'products_active':
$cat_products_query = "SELECT p.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE p.`products_id` = p2c.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t and p2c.`categories_id` = '" . (int) $category_id . "'";
break;
}
} else {
switch ($counts_what) {
case 'products':
$cat_products_query = "SELECT count(*) as `total`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE p.`products_id` = p2c.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t and p.`products_status` = '1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t and p2c.`categories_id` = '" . (int) $category_id . "'";
break;
case 'products_active':
$cat_products_query = "SELECT p.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE p.`products_id` = p2c.`products_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t and p.`products_status` = '1'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t and p2c.`categories_id` = '" . (int) $category_id . "'";
break;
}
}
$cat_products = $gBitDb->Execute($cat_products_query);
switch ($counts_what) {
case 'products':
$cat_products_count += $cat_products->fields['total'];
break;
case 'products_active':
while (!$cat_products->EOF) {
if (zen_get_product_is_linked($cat_products->fields['products_id']) == 'true') {
return 'true';
}
$cat_products->MoveNext();
}
break;
}
$cat_child_categories_query = "SELECT `categories_id`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM " . TABLE_CATEGORIES . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE `parent_id` = '" . (int) $category_id . "'";
$cat_child_categories = $gBitDb->Execute($cat_child_categories_query);
if ($cat_child_categories->RecordCount() > 0) {
while (!$cat_child_categories->EOF) {
switch ($counts_what) {
case 'products':
$cat_products_count += zen_get_products_to_categories($cat_child_categories->fields['categories_id'], $include_inactive);
break;
case 'products_active':
if (zen_get_products_to_categories($cat_child_categories->fields['categories_id'], true, 'products_active') == 'true') {
return 'true';
}
break;
}
$cat_child_categories->MoveNext();
}
}
switch ($counts_what) {
case 'products':
return $cat_products_count;
break;
case 'products_active':
return 'true';
break;
}
}
开发者ID:bitweaver,项目名称:commerce,代码行数:64,代码来源:general.php
注:本文中的zen_get_product_is_linked函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论