• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zen_get_products_category_id函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中zen_get_products_category_id函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_products_category_id函数的具体用法?PHP zen_get_products_category_id怎么用?PHP zen_get_products_category_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了zen_get_products_category_id函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: die

 * @package modules
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: category_icon_display.php 16776 2010-06-24 20:48:53Z drbyte $
 */
if (!defined('IS_ADMIN_FLAG')) {
    die('Illegal Access');
}
if ($cPath == '' || $cPath == 0) {
    $cPath = zen_get_product_path((int) $_GET['products_id']);
}
if (!isset($_GET['cPath']) || $_GET['cPath'] == '') {
    $_GET['cPath'] = $cPath;
}
$cPath_new = zen_get_path(zen_get_products_category_id((int) $_GET['products_id']));
//      if ((zen_get_categories_image(zen_get_products_category_id((int)$_GET['products_id']))) !='') {
switch (true) {
    case $module_show_categories == '1':
        $align = 'left';
        break;
    case $module_show_categories == '2':
        $align = 'center';
        break;
    case $module_show_categories == '3':
        $align = 'right';
        break;
}
//echo 'I SEE ' . $cPath . ' vs ' . $current_category_id;
//$category_icon_display_name = zen_get_categories_name(zen_get_products_category_id((int)$_GET['products_id']), $_SESSION['languages_id']);
//$category_icon_display_image = zen_get_categories_image(zen_get_products_category_id((int)$_GET['products_id']));
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:category_icon_display.php


示例2: zen_get_module_directory

<?php

/**
 * Module Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2005 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_modules_category_icon_display.php 2747 2005-12-31 06:05:37Z ajeh $
 */
require DIR_WS_MODULES . zen_get_module_directory(FILENAME_CATEGORY_ICON_DISPLAY);
?>

<div align="<?php 
echo $align;
?>
" id="categoryIcon" class="categoryIcon"><?php 
echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . zen_get_categories_image(zen_get_products_category_id((int) $_GET['products_id'])), zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']), CATEGORY_ICON_IMAGE_WIDTH, CATEGORY_ICON_IMAGE_HEIGHT) . '<br />' . zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']) . '</a>';
?>
</div>
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:21,代码来源:tpl_modules_category_icon_display.php


示例3: zen_get_products_sale_discount

function zen_get_products_sale_discount($product_id = false, $categories_id = false, $display_type = false)
{
    global $currencies;
    global $db;
    // get products category
    if ($categories_id == true) {
        $check_category = $categories_id;
    } else {
        $check_category = zen_get_products_category_id($product_id);
    }
    $deduction_type_array = array(array('id' => '0', 'text' => DEDUCTION_TYPE_DROPDOWN_0), array('id' => '1', 'text' => DEDUCTION_TYPE_DROPDOWN_1), array('id' => '2', 'text' => DEDUCTION_TYPE_DROPDOWN_2));
    $sale_maker_discount = 0;
    $salemaker_sales = $db->Execute("select sale_id, sale_status, sale_name, sale_categories_all, sale_deduction_value, sale_deduction_type, sale_pricerange_from, sale_pricerange_to, sale_specials_condition, sale_categories_selected, sale_date_start, sale_date_end, sale_date_added, sale_date_last_modified, sale_date_status_change from " . TABLE_SALEMAKER_SALES . " where sale_status='1'");
    while (!$salemaker_sales->EOF) {
        $categories = explode(',', $salemaker_sales->fields['sale_categories_all']);
        while (list($key, $value) = each($categories)) {
            if ($value == $check_category) {
                $sale_maker_discount = $salemaker_sales->fields['sale_deduction_value'];
                $sale_maker_discount_type = $salemaker_sales->fields['sale_deduction_type'];
                break;
            }
        }
        $salemaker_sales->MoveNext();
    }
    switch (true) {
        // percentage discount only
        case $sale_maker_discount_type == 1:
            $sale_maker_discount = 1 - $sale_maker_discount / 100;
            break;
        case $sale_maker_discount_type == 0 and $display_type == true:
            $sale_maker_discount = $sale_maker_discount;
            break;
        case $sale_maker_discount_type == 0 and $display_type == false:
            $sale_maker_discount = $sale_maker_discount;
            break;
        case $sale_maker_discount_type == 2 and $display_type == true:
            $sale_maker_discount = $sale_maker_discount;
            break;
        default:
            $sale_maker_discount = 1;
            break;
    }
    if ($display_type == true) {
        if ($sale_maker_discount != 1 and $sale_maker_discount != 0) {
            switch (true) {
                case $sale_maker_discount_type == 0:
                    $sale_maker_discount = $currencies->format($sale_maker_discount) . ' ' . $deduction_type_array[$sale_maker_discount_type]['text'];
                    break;
                case $sale_maker_discount_type == 2:
                    $sale_maker_discount = $currencies->format($sale_maker_discount) . ' ' . $deduction_type_array[$sale_maker_discount_type]['text'];
                    break;
                case $sale_maker_discount_type == 1:
                    $sale_maker_discount = number_format(1.0 - $sale_maker_discount, 2, ".", "") . ' ' . $deduction_type_array[$sale_maker_discount_type]['text'];
                    break;
            }
        } else {
            $sale_maker_discount = '';
        }
    }
    return $sale_maker_discount;
}
开发者ID:bobjacobsen,项目名称:EventTools,代码行数:61,代码来源:functions_prices.php


示例4: array

<?php

$display_num = 12;
$subCategoriesArray = array();
if (isset($_GET['products_id'])) {
    $relatedCategoriesParentId = zen_get_products_category_id($_GET['products_id']);
    $relatedCategoriesId = zen_get_categories_parent_id($relatedCategoriesParentId);
    zen_get_subcategoriesarray($subCategoriesArray, $relatedCategoriesId);
} else {
    if (isset($current_category_id)) {
        $parent_id = zen_get_categories_parent_id($current_category_id);
        zen_get_subcategoriesarray($subCategoriesArray, $relatedCategoriesId);
    }
}
$relatedCategoriesTotalNum = count($subCategoriesArray);
?>
<div class="fl allborder line_180" id="relate_cate">
	<h4 class="red line_30px in_1em"><?php 
echo BASE_COMMON_TEXT_RELATEDCATEGORIES;
?>
</h4>
	<ul>
	<?php 
if ($relatedCategoriesTotalNum > 0) {
    for ($i = 0; $i < $display_num; $i++) {
        echo '<li><a href="' . zen_href_link(FILENAME_DEFAULT, 'cPath=' . $subCategoriesArray[$i]['categories_id']) . '" title="' . SEO_COMMON_KEYWORDS . $subCategoriesArray[$i]['categories_name'] . '">' . zen_clipped_string($subCategoriesArray[$i]['categories_name']) . '</a></li>';
    }
}
unset($row, $display, $subCategoriesArray, $related_categories_query);
?>
	</ul>
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:related_categories.php


示例5: array

        
        // bof note links
        // customers note
        if($nInfo->customers_id > 0)
          $contents[] = array('text' => '<a href="' . FILENAME_CUSTOMERS . '.php' . '?cID=' . $nInfo->customers_id . '&action=edit' . '"><strong>' . TEXT_INFO_NOTE_CUSTOMER . '</strong></a>');
        
        // orders note   
        if($nInfo->orders_id > 0)
          $contents[] = array('text' => '<a href="' . FILENAME_ORDERS . '.php' . '?oID=' . $nInfo->orders_id . '&action=edit' . '"><strong>' . TEXT_INFO_NOTE_ORDER . '</strong></a>');
        
        if(zen_not_null($nInfo->categories_id))
          $contents[] = array('text' => '<a href="' . FILENAME_CATEGORIES . '.php' . '?cPath=' . $nInfo->categories_id . '"><strong>' . TEXT_INFO_NOTE_CATEGORY . '</strong></a>');
        
        // products note
        if($nInfo->products_id > 0)
          $contents[] = array('text' => '<a href="' . FILENAME_PRODUCT . '.php' . '?action=new_product&pID=' . $nInfo->products_id . '&product_type=' . zen_get_products_type($nInfo->products_id) . '&cPath=' . zen_get_products_category_id($nInfo->products_id) . '"><strong>' . TEXT_INFO_NOTE_PRODUCT . '</strong></a>');                                
        // eof note links
         
        $contents[] = array('text' => '<br />' . TEXT_INFO_NOTE_TEXT . '<p style="font-weight: bold; ">' . nl2br(stripslashes($nInfo->notes_text)) . '</p>');
        
         $contents[] = array('text' => '<br />' . TEXT_INFO_DATE_CREATED . zen_date_long($nInfo->notes_date_created));
        if (zen_not_null($nInfo->notes_date_modified)) $contents[] = array('text' => TEXT_INFO_NOTE_DATE_MODIFIED . ': ' . zen_date_long($nInfo->notes_date_modified));

      }
        break;
    }

    if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
      echo '            <td width="25%" valign="top">' . "\n";

      $box = new box;
开发者ID:quangn92,项目名称:visualyou,代码行数:30,代码来源:notes.php


示例6: array

            </table></td>
<?php 
    $heading = array();
    $contents = array();
    switch ($action) {
        case 'delete':
            $heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>');
            $contents = array('form' => zen_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm'));
            $contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO);
            $contents[] = array('text' => '<br><b>' . $rInfo->products_name . '</b>');
            $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
            break;
        default:
            if (isset($rInfo) && is_object($rInfo)) {
                $heading[] = array('text' => '<b>' . $rInfo->products_name . '</b>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a> ' . ' <a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_products_category_id($rInfo->products_id) . '&pID=' . $rInfo->products_id) . '">' . zen_image_button('button_details.gif', IMAGE_DETAILS) . '</a>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($rInfo->date_added));
                if (zen_not_null($rInfo->last_modified)) {
                    $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($rInfo->last_modified));
                }
                $contents[] = array('text' => '<br>' . zen_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
                $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name);
                $contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif'));
                $contents[] = array('text' => TEXT_INFO_REVIEW_READ . ' ' . $rInfo->reviews_read);
                $contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_SIZE . ' ' . $rInfo->reviews_text_size . ' bytes');
                $contents[] = array('text' => '<br>' . TEXT_INFO_PRODUCTS_AVERAGE_RATING . ' ' . number_format($rInfo->average_rating, 2) . '%');
            }
            break;
    }
    if (zen_not_null($heading) && zen_not_null($contents)) {
        echo '            <td width="25%" valign="top">' . "\n";
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:31,代码来源:reviews.php


示例7: switch

$canonicalLink = '';
switch (TRUE) {
    /**
     * SSL Pages get no special treatment, since they're not normally indexed (unless the entire site is intentionally set to always be SSL, which is not typical)
     */
    case $request_type == 'SSL' && substr(HTTP_SERVER, 0, 5) != 'https':
        $canonicalLink = '';
        break;
        /**
         * for products (esp those linked to multiple categories):
         */
    /**
     * for products (esp those linked to multiple categories):
     */
    case strstr($current_page, '_info') && isset($_GET['products_id']):
        $canonicalLink = zen_href_link($current_page, ($includeCPath ? 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_GET['products_id'])) . '&' : '') . 'products_id=' . $_GET['products_id'], 'NONSSL', false);
        break;
        /**
         * for product listings:
         */
    /**
     * for product listings:
     */
    case $current_page == 'index' && isset($_GET['cPath']):
        $canonicalLink = zen_href_link($current_page, zen_get_all_get_params($excludeParams), 'NONSSL', false);
        break;
        /**
         * for music products:
         */
    /**
     * for music products:
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:init_canonical.php


示例8: zen_active_notes

function zen_active_notes()
{
    global $db, $messageStack;
    // BOF list active notes
    $order_by = 'ORDER BY notes_categories_name';
    $notes_categories_query = "select * FROM " . TABLE_NOTES_CATEGORIES . " " . $order_by;
    $notes_categories_results = $db->Execute($notes_categories_query);
    while (!$notes_categories_results->EOF) {
        $order_by = 'ORDER BY notes_start_date DESC';
        // use CURDATE ?
        //$notes_active_query = ("select * FROM " . TABLE_NOTES . " n LEFT JOIN " . TABLE_NOTES_CATEGORIES . " nc ON (n.notes_categories_id = nc.notes_categories_id) " . " WHERE (`notes_status` = '1') AND (((`notes_start_date` <= NOW()) AND (`notes_start_date` >= '0001-01-01')) AND  ((`notes_end_date` >= NOW()) OR (`notes_end_date` <= '0001-01-01')))" . $order_by);
        $notes_active_query = "select * FROM " . TABLE_NOTES . " WHERE ((`notes_is_public` = '1' || `admin_id` = '" . (int) $_SESSION['admin_id'] . "') AND ((`notes_categories_id` = '" . $notes_categories_results->fields['notes_categories_id'] . "') AND ((`notes_status` = '1') AND (((`notes_start_date` <= NOW()) AND (`notes_start_date` >= '0001-01-01')) AND  ((`notes_end_date` >= NOW()) OR (`notes_end_date` <= '0001-01-01'))))))" . $order_by;
        $notes_active_results = $db->Execute($notes_active_query);
        if (count($notes_active_results) > 0) {
            if (isset($_GET['oID']) && $_GET['oID'] > 0) {
                // lookup the customer id of the order
                // so we can show the customer notes when viewing orders ($order is not available yet at this point, we need a query)
                $notes_customer_query = "select customers_id FROM " . TABLE_ORDERS . " WHERE (`orders_id` = " . (int) $_GET['oID'] . ") LIMIT 1";
                $notes_customer_result = $db->Execute($notes_customer_query);
            }
        }
        $messageStackArray = array();
        while (!$notes_active_results->EOF) {
            /*
            echo '<pre>';
            print_r($notes_active_results->fields);
            echo '</pre>';
            */
            $note_link = zen_href_link('notes', 'nID=' . $notes_active_results->fields['notes_id']);
            $notes_active_array = $notes_active_results->fields;
            $notes_active = new objectInfo($notes_active_array);
            //print_r($notes_active);
            switch (true) {
                case $notes_active->notes_is_special_status == 1:
                    // special products, customers, orders or categories note
                    if (basename($_SERVER['PHP_SELF']) != FILENAME_NOTES) {
                        // do not show on notes page itself
                        if ($notes_active->customers_id > 0 || $notes_active->orders_id > 0 || $notes_active->categories_id > 0 || $notes_active->products_id > 0) {
                            // these notes must only be shown when the customer/order/category/product is viewed by the admin
                            // customers note
                            if (isset($_GET['cID']) && $_GET['cID'] == $notes_active->customers_id || $notes_customer_result->fields['customers_id'] > 0 && $notes_customer_result->fields['customers_id'] == $notes_active->customers_id) {
                                $messageStackArray[] = '<a href="' . $note_link . '&action=view' . '">' . $notes_active_results->fields['notes_title'] . '</a> (Special Customers note)';
                            }
                            // orders note
                            if (isset($_GET['oID']) && $_GET['oID'] == $notes_active->orders_id) {
                                $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a> (Special Orders note)';
                            }
                            // category note
                            if (isset($_GET['cPath']) && $_GET['cPath'] != '' && $_GET['cPath'] == $notes_active->categories_id) {
                                $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a> (Special Categories note)';
                            }
                            // products note
                            if (isset($_GET['pID']) && $_GET['pID'] == $notes_active->products_id) {
                                $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a> (Special Products note)';
                            }
                        } else {
                            // note is not attached yet
                            if (isset($_GET['pID']) || isset($_GET['cPath']) || isset($_GET['oID']) || isset($_GET['cID'])) {
                                $parameters = '';
                                $parameters = (isset($_GET['cPath']) ? '&cPath=' . $_GET['cPath'] : '') . (isset($_GET['pID']) ? '&pID=' . (int) $_GET['pID'] : '') . (isset($_GET['oID']) ? '&oID=' . (int) $_GET['oID'] : '') . (isset($_GET['cID']) ? '&cID=' . (int) $_GET['cID'] : '');
                                $messageStackArray[] = 'Attach this ' . ' note now? ' . '<a href="' . $note_link . '&action=edit' . $parameters . '">' . $notes_active_results->fields['notes_title'] . '</a>';
                            }
                        }
                    }
                    break;
                case $notes_active->notes_is_special_status != 1 && ($notes_active->customers_id > 0 || $notes_active->orders_id > 0 || $notes_active->categories_id > 0 || $notes_active->products_id > 0):
                    // non special products, customers, orders or categories note
                    // customers note
                    if ($notes_active->customers_id > 0) {
                        $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a>' . '| <a href="' . FILENAME_CUSTOMERS . '.php' . '?cID=' . $notes_active->customers_id . '&action=edit' . '">' . 'Edit customer' . '</a>';
                    }
                    // orders note
                    if ($notes_active->orders_id > 0) {
                        $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a>' . ' | <a href="' . FILENAME_ORDERS . '.php' . '?oID=' . $notes_active->orders_id . '&action=edit' . '">' . 'Edit order' . '</a>';
                    }
                    // category note)
                    if (zen_not_null($notes_active->categories_id)) {
                        $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a>' . ' | <a href="' . FILENAME_CATEGORIES . '.php' . '?cPath=' . $notes_active->categories_id . '">' . 'Edit category' . '</a>';
                    }
                    // products note
                    if ($notes_active->products_id > 0) {
                        //&product_type=1&cPath=1_4&pID=1&action=new_product;
                        $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a>' . ' | <a href="' . FILENAME_PRODUCT . '.php' . '?action=new_product&pID=' . $notes_active->products_id . '&product_type=' . zen_get_products_type($notes_active->products_id) . '&cPath=' . zen_get_products_category_id($notes_active->products_id) . '">' . 'Edit product' . '</a>';
                    }
                    break;
                default:
                    // general notes
                    $messageStackArray[] = '<a href="' . $note_link . '">' . $notes_active_results->fields['notes_title'] . '</a>';
                    break;
            }
            if ($notes_active->notes_is_special_status == 1 && basename($_SERVER['PHP_SELF']) != FILENAME_NOTES) {
                $show_special = true;
            }
            if ($notes_active->customers_id > 0 || $notes_active->orders_id > 0 || $notes_active->categories_id > 0 || $notes_active->products_id > 0) {
            } elseif ($special) {
                // ask to attach
                //exit('special attach ' . $notes_active->notes_id);
            } elseif ($notes_active->notes_is_special_status != 1) {
            }
            $notes_active_results->MoveNext();
//.........这里部分代码省略.........
开发者ID:quangn92,项目名称:visualyou,代码行数:101,代码来源:init_notes_notifier.php


示例9: zen_href_link

 *
 * @package templateSystem
 * @copyright Copyright 2003-2006 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_product_free_shipping_info_display.php 5369 2006-12-23 10:55:52Z drbyte $
 */
// only display when more than 1
if ($products_found_count > 1) {
    ?>

<div class="fr"><a href="<?php 
    echo zen_href_link(FILENAME_DEFAULT, 'cPath=' . zen_get_products_category_id($_GET['products_id']));
    ?>
" / class="b_" title="<?php 
    echo zen_get_category_name(zen_get_products_category_id($_GET['products_id']), $_SESSION['languages_id']);
    ?>
">other item in the list</a>&nbsp;<span id="recent_flash_smallPage" class="product_title">
  <?php 
    //echo (PREV_NEXT_PRODUCT);
    ?>
  <?php 
    //echo ($position+1 . "/" . $counter);
    ?>
  </span></div>
<?php 
}
if ($messageStack->size('product_info') > 0) {
    echo $messageStack->output('product_info');
}
?>
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:tpl_product_free_shipping_info_display.php


示例10: foreach

     if ($productIsSBA[$i] && (PRODINFO_ATTRIBUTE_PLUGIN_MULTI == 'single_dropdown' || PRODINFO_ATTRIBUTE_PLUGIN_MULTI == 'single_radioset') && (PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '1' || PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '2')) {
         /* Breakdown the attributes into individual attributes to then be able to 
          * feed them into the applicable section(s).
          * 
          */
     }
     foreach ($_POST['id'] as $key => $value) {
         $check = zen_get_attributes_valid($_POST['products_id'], $key, $value);
         if ($check == false) {
             $the_list .= TEXT_ERROR_OPTION_FOR . '<span class="alertBlack">' . zen_options_name($key) . '</span>' . TEXT_INVALID_SELECTION . '<span class="alertBlack">' . ($value == (int) PRODUCTS_OPTIONS_VALUES_TEXT_ID ? TEXT_INVALID_USER_INPUT : zen_values_name($value)) . '</span>' . '<br />';
         }
     }
 }
 if (!is_numeric($_POST['cart_quantity']) || $_POST['cart_quantity'] < 0) {
     // adjust quantity when not a value
     $chk_link = '<a href="' . zen_href_link(zen_get_info_page($_POST['products_id']), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_POST['products_id'])) . '&products_id=' . $_POST['products_id']) . '">' . zen_get_products_name($_POST['products_id']) . '</a>';
     $messageStack->add_session('header', ERROR_CORRECTIONS_HEADING . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . $chk_link . ' ' . PRODUCTS_ORDER_QTY_TEXT . zen_output_string_protected($_POST['cart_quantity']), 'caution');
     $_POST['cart_quantity'] = 0;
 }
 $attr_list = array();
 $attr_dash = array();
 $attr_id = array();
 $attr_val = array();
 if ((PRODINFO_ATTRIBUTE_PLUGIN_MULTI == 'single_dropdown' || PRODINFO_ATTRIBUTE_PLUGIN_MULTI == 'single_radioset') && (PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '1' || PRODINFO_ATTRIBUTE_DYNAMIC_STATUS == '2')) {
     /*single dropdown as multiple*/
     $attr_list = explode(',', $_POST['attrcomb']);
     foreach ($attr_list as $attr_item) {
         list($attr_id, $attr_val) = explode('-', $attr_item);
         if (zen_not_null($attr_id) && zen_not_null($attr_val)) {
             $_POST['id'][$attr_id] = $attr_val;
         }
开发者ID:badarac,项目名称:stock_by_attribute_1.5.4,代码行数:31,代码来源:stock_by_attributes.php


示例11: array

<div class="centerBoxWrapper" id="similar_product">
<h2 class="centerBoxHeading"><span>Related Products</span></h2>
<ul>
<?php 
$products_id = (int) $_GET['products_id'];
$flash_page_id_con = array();
$flash_page_images_con = array();
$flash_page_price_con = array();
$flash_page_name_con = array();
$flash_page_query = "select p.products_id,p.products_image,pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.`products_id`=pd.`products_id` AND pd.`language_id` = '" . (int) $_SESSION['languages_id'] . "' AND p.`master_categories_id` = " . zen_get_products_category_id($products_id) . " ORDER BY rand() limit 12";
$flash_page = $db->Execute($flash_page_query);
while (!$flash_page->EOF) {
    $flash_page_items[] = $flash_page->fields;
    $flash_page_id_con[] = $flash_page->fields['products_id'];
    $flash_page_images_src = is_int(strpos($flash_page->fields['products_image'], ',')) ? substr($flash_page->fields['products_image'], 0, strpos($flash_page->fields['products_image'], ',')) : $flash_page->fields['products_image'];
    $flash_page_images_con[] = '"' . (zen_not_null($flash_page->fields['products_image']) ? $flash_page_images_src : PRODUCTS_IMAGE_NO_IMAGE) . '"';
    $flash_page_price_con[] = '"' . $currencies->display_price(zen_get_products_base_price($flash_page->fields['products_id']), zen_get_tax_rate($product_check->fields['products_tax_class_id'])) . '"';
    $flash_page_name_con[] = '"' . zen_output_string(zen_get_products_name($flash_page->fields['products_id'])) . '"';
    $flash_page->MoveNext();
}
$flash_page_id = implode(",", $flash_page_id_con);
$flash_page_images = implode(",", $flash_page_images_con);
$flash_page_price = implode(",", $flash_page_price_con);
$flash_page_name = implode(",", $flash_page_name_con);
$flash_page_display_num = $flash_page->RecordCount();
for ($i = 0; $i < $flash_page_display_num; $i++) {
    ?>
<li id="li<?php 
    echo $i;
    ?>
" style="display:block;float:left;padding-left:10px;width:22%;">
开发者ID:dalinhuang,项目名称:nightvision,代码行数:31,代码来源:tpl_product_info_similar.php


示例12: __retrieve_reward_point_ratio

 function __retrieve_reward_point_ratio($products_id)
 {
     $categories_id = zen_get_products_category_id($products_id);
     if ($this->_retrieve_products_ratio($products_id) !== 'false') {
         // products ratio
         $ratio = $this->_retrieve_products_ratio($products_id);
     } elseif ($this->_retrieve_categories_ratio($categories_id) !== 'false') {
         // category ratio
         $ratio = $this->_retrieve_categories_ratio($categories_id);
     } else {
         // use global ratio
         $ratio = MODULE_ORDER_TOTAL_SC_ORDER_REWARD_PERCENTAGE;
     }
     return (double) ($ratio / 100);
 }
开发者ID:happyxlq,项目名称:lt_svn,代码行数:15,代码来源:store_credit.php


示例13: zen_href_link

                case $module_show_categories == '3':
                    $align = 'right';
                    break;
            }
            if ($module_next_previous != '3') {
                ?>
  <tr>
    <td colspan="3" align="<?php 
                echo $align;
                ?>
">
      <?php 
                echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_image(DIR_WS_IMAGES . zen_get_categories_image(zen_get_products_category_id((int) $_GET['products_id'])), zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, ' align="middle"') . '</a>';
                ?>
      <?php 
                echo '<a href="' . zen_href_link(FILENAME_DEFAULT, $cPath_new, 'NONSSL') . '">' . zen_get_categories_name(zen_get_products_category_id((int) $_GET['products_id']), $_SESSION['languages_id']) . '</a>';
                ?>
    </td>
  </tr>
<?php 
            }
            // don't show when top and bottom
        }
    }
    ?>
  <tr>
    <td align="center" class="smallText" colspan="3"><?php 
    echo PREV_NEXT_PRODUCT;
    echo $position + 1 . "/" . $counter;
    ?>
</td>
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:tpl_products_next_previous.php


示例14: zen_get_categories_products_list

function zen_get_categories_products_list($categories_id, $include_deactivated = false, $include_child = true)
{
    global $db;
    global $categories_products_id_list;
    if ($include_deactivated) {
        $products = $db->Execute("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) $categories_id . "'");
    } else {
        $products = $db->Execute("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) $categories_id . "'");
    }
    while (!$products->EOF) {
        // categories_products_id_list keeps resetting when category changes ...
        //      echo 'Products ID: ' . $products->fields['products_id'] . '<br>';
        if (category_allowed($products->fields['categories_id']) == 'true') {
            $categories_products_id_list[] = $products->fields['products_id'];
        }
        $products->MoveNext();
    }
    if ($include_child && category_allowed(zen_get_products_category_id($products->fields['products_id'])) == 'true') {
        $childs = $db->Execute("select categories_id from " . TABLE_CATEGORIES . "\n                              where parent_id = '" . (int) $categories_id . "'");
        if ($childs->RecordCount() > 0) {
            while (!$childs->EOF) {
                zen_get_categories_products_list($childs->fields['categories_id'], $include_deactivated);
                $childs->MoveNext();
            }
        }
    }
    $products_id_listing = $categories_products_id_list;
    return $products_id_listing;
}
开发者ID:happyxlq,项目名称:lt_svn,代码行数:29,代码来源:general.php


示例15: array

<?php

/**
 * @package modules
 * @author [email protected]
 * @copyright Copyright 2013 SL Development Team
 * @copyright Portions Copyright 2003 osCommerce
 */
$tpl_products = array('title' => '', 'products' => array());
if ((int) $_GET['products_id'] > 0) {
    $sql = 'SELECT p.products_image, pd.products_name, p.products_quantity, p.products_id, p.products_type, p.master_categories_id, p.manufacturers_id, p.products_price,
	 p.products_tax_class_id, pd.products_description, IF(s.status = 1, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status =1, s.specials_new_products_price, p.products_price) as final_price,
	 p.products_sort_order, p.product_is_call, p.product_is_free, p.product_is_always_free_shipping, p.products_qty_box_status
			FROM ' . TABLE_PRODUCTS_DESCRIPTION . ' pd, .' . TABLE_PRODUCTS . ' p left join ' . TABLE_MANUFACTURERS . ' m on (p.manufacturers_id = m.manufacturers_id),
				' . TABLE_PRODUCTS_TO_CATEGORIES . ' p2c left join ' . TABLE_SPECIALS . ' s on (p2c.products_id = s.products_id)
			WHERE p.products_status = 1 and (p.products_id = p2c.products_id) and (pd.products_id = p2c.products_id)
					 and p.shop_id = ' . (int) $_SESSION['shop_id'] . '
				and pd.language_id = \'' . (int) $_SESSION['languages_id'] . '\' and p.master_categories_id = \'' . (int) zen_get_products_category_id($_GET['products_id']) . '\'
			ORDER BY RAND()';
    $relateds = $db->Execute($sql, MAX_DISPLAY_PRODUCTS_RELATED, true, CACHE_TIMELIFT);
    while (!$relateds->EOF) {
        $tpl_products['products'][$relateds->fields['products_id']] = array('name' => $relateds->fields['products_name'], 'image' => $relateds->fields['products_image'], 'quantity' => $relateds->fields['products_quantity'], 'weight' => $relateds->fields['products_weight'], 'type' => $relateds->fields['products_type'], 'categories_id' => $relateds->fields['master_categories_id'], 'manufacturers_id' => $relateds->fields['manufacturers_id'], 'products_price' => $relateds->fields['products_price'], 'tax_class_id' => $relateds->fields['products_tax_class_id'], 'specials_price' => $relateds->fields['specials_new_products_price'], 'final_price' => $relateds->fields['final_price'], 'sort_order' => $relateds->fields['products_sort_order'], 'is_call' => $relateds->fields['product_is_call'], 'is_always_free_shipping' => $relateds->fields['product_is_always_free_shipping'], 'qty_box_status' => $relateds->fields['products_qty_box_status'], 'href' => zen_href_link(zen_get_info_page($relateds->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ? zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($relateds->fields['master_categories_id']))) . '&products_id=' . $relateds->fields['products_id']), 'display_price' => zen_get_products_display_price($relateds->fields['products_id']), 'is_free' => $relateds->fields['product_is_free'] == '1' ? true : false, 'display_normal_price' => get_normal_price($relateds->fields['products_id']), 'display_special_price' => get_special_price($relateds->fields['products_id']), 'display_sale_price' => get_sale_discount_price($relateds->fields['products_id']));
        $relateds->MoveNext();
    }
}
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:25,代码来源:product_related.php


示例16: get_products

 /**
  * Method to return details of all products in the cart
  *
  * @param boolean whether to check if cart contents are valid
  * @return array
  */
 function get_products($check_for_valid_cart = false)
 {
     global $db;
     $this->notify('NOTIFIER_CART_GET_PRODUCTS_START');
     if (!is_array($this->contents)) {
         return false;
     }
     $products_array = array();
     reset($this->contents);
     while (list($products_id, ) = each($this->contents)) {
         $products_query = "select p.products_id, p.master_categories_id, p.products_status, pd.products_name, p.products_model, p.products_image,\n                                  p.products_price,p.products_price_sample, p.products_weight, p.products_tax_class_id,\n                                  p.products_quantity_order_min, p.products_quantity_order_units,\n                                  p.product_is_free, p.products_priced_by_attribute,\n                                  p.products_discount_type, p.products_discount_type_from\n                           from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd\n                           where p.products_id = '" . (int) $products_id . "'\n                           and pd.products_id = p.products_id\n                           and pd.language_id = '" . (int) $_SESSION['languages_id'] . "'";
         if ($products = $db->Execute($products_query)) {
             $prid = $products->fields['products_id'];
             $products_price = $products->fields['products_price'] == 0 ? $products->fields['products_price_sample'] : $products->fields['products_price'];
             //fix here
             /*
             $special_price = zen_get_products_special_price($prid);
             if ($special_price) {
             $products_price = $special_price;
             }
             */
             $special_price = zen_get_products_special_price($prid);
             if ($special_price and $products->fields['products_priced_by_attribute'] == 0) {
                 $products_price = $special_price;
             } else {
                 $special_price = 0;
             }
             if (zen_get_products_price_is_free($products->fields['products_id'])) {
                 // no charge
                 $products_price = 0;
             }
             // adjust price for discounts when priced by attribute
             if ($products->fields['products_priced_by_attribute'] == '1' and zen_has_product_attributes($products->fields['products_id'], 'false')) {
                 // reset for priced by attributes
                 //            $products_price = $products->fields['products_price'];
                 if ($special_price) {
                     $products_price = $special_price;
                 } else {
                     $products_price = $products->fields['products_price'];
                 }
             } else {
                 // discount qty pricing
                 $categories_query = $db->Execute("SELECT categories_discount_type FROM " . TABLE_CATEGORIES . " WHERE categories_id = " . zen_get_products_category_id($products_id));
                 if ($products->fields['products_discount_type'] != 0 || $categories_query->fields['categories_discount_type'] != 0) {
                     $products_price = zen_get_products_discount_price_qty($products->fields['products_id'], $this->contents[$products_id]['qty']);
                 }
             }
             // validate cart contents for checkout
             if ($check_for_valid_cart == true) {
                 $fix_once = 0;
                 // Check products_status if not already
                 $check_status = $products->fields['products_status'];
                 if ($check_status == 0) {
                     $fix_once++;
                     $_SESSION['valid_to_checkout'] = false;
                     $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products->fields['products_name'] . ERROR_PRODUCT_STATUS_SHOPPING_CART . '<br />';
                     $this->remove($products_id);
                 }
                 // check only if valid products_status
                 if ($fix_once == 0) {
                     $check_quantity = $this->contents[$products_id]['qty'];
                     $check_quantity_min = $products->fields['products_quantity_order_min'];
                     // Check quantity min
                     if ($new_check_quantity = $this->in_cart_mixed($prid)) {
                         $check_quantity = $new_check_quantity;
                     }
                 }
                 if ($fix_once == 0) {
                     if ($check_quantity < $check_quantity_min) {
                         $fix_once++;
                         $_SESSION['valid_to_checkout'] = false;
                         $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products->fields['products_name'] . ERROR_PRODUCT_QUANTITY_MIN_SHOPPING_CART . ERROR_PRODUCT_QUANTITY_ORDERED . $check_quantity . ' <span class="alertBlack">' . zen_get_products_quantity_min_units_display((int) $prid, false, true) . '</span> ' . '<br />';
                     }
                 }
                 // Check Quantity Units if not already an error on Quantity Minimum
                 if ($fix_once == 0) {
                     $check_units = $products->fields['products_quantity_order_units'];
                     if (fmod_round($check_quantity, $check_units) != 0) {
                         $_SESSION['valid_to_checkout'] = false;
                         $_SESSION['cart_errors'] .= ERROR_PRODUCT . $products- 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zen_get_products_description函数代码示例发布时间:2022-05-23
下一篇:
PHP zen_get_products_base_price函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap