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

PHP zen_get_product_path函数代码示例

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

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



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

示例1: substr

        $session_data_zone = substr($session_data, $start_zone, strpos($session_data, ';', $start_zone) - $start_zone + 1);
        session_decode($session_data_id);
        session_decode($session_data_currency);
        session_decode($session_data_country);
        session_decode($session_data_zone);
        session_decode($session_data_cart);
        if (PHP_VERSION < 4) {
            $broken_cart = $cart;
            $cart = new shoppingCart();
            $cart->unserialize($broken_cart);
        }
        if (is_object($_SESSION['cart'])) {
            $contents[] = array('text' => $full_name . ' - ' . $ip_address . '<br />' . $info);
            $products = $_SESSION['cart']->get_products();
            for ($i = 0, $n = sizeof($products); $i < $n; $i++) {
                $contents[] = array('text' => $products[$i]['quantity'] . ' x ' . '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'cPath=' . zen_get_product_path($products[$i]['id']) . '&pID=' . $products[$i]['id']) . '">' . $products[$i]['name'] . '</a>');
                // cPath=23&pID=74
            }
            if (sizeof($products) > 0) {
                $contents[] = array('text' => zen_draw_separator('pixel_black.gif', '100%', '1'));
                $contents[] = array('align' => 'right', 'text' => TEXT_SHOPPING_CART_SUBTOTAL . ' ' . $currencies->format($_SESSION['cart']->show_total(), true, $_SESSION['currency']));
            } else {
                $contents[] = array('text' => TEXT_EMPTY_CART);
            }
        }
    }
}
if (zen_not_null($heading) && zen_not_null($contents)) {
    echo '            <td width="25%" valign="top">' . "\n";
    $box = new box();
    echo $box->infoBox($heading, $contents);
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:whos_online.php


示例2: validate_for_category

function validate_for_category($product_id, $coupon_id)
{
    global $db;
    $retVal = 'none';
    $productCatPath = zen_get_product_path($product_id);
    $catPathArray = array_reverse(explode('_', $productCatPath));
    $sql = "SELECT count(*) AS total\r\n            FROM " . TABLE_COUPON_RESTRICT . "\r\n            WHERE category_id = -1\r\n            AND coupon_restrict = 'Y'\r\n            AND coupon_id = " . (int) $coupon_id . " LIMIT 1";
    $checkQuery = $db->execute($sql);
    foreach ($catPathArray as $catPath) {
        $sql = "SELECT * FROM " . TABLE_COUPON_RESTRICT . "\r\n              WHERE category_id = " . (int) $catPath . "\r\n              AND coupon_id = " . (int) $coupon_id;
        $result = $db->execute($sql);
        if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'N') {
            return true;
        }
        if ($result->recordCount() > 0 && $result->fields['coupon_restrict'] == 'Y') {
            return false;
        }
    }
    if ($checkQuery->fields['total'] > 0) {
        return false;
    } else {
        return 'none';
    }
}
开发者ID:dalinhuang,项目名称:cameras,代码行数:24,代码来源:functions_general.php


示例3: splitPageResults

if (isset($_GET['page']) && $_GET['page'] > 1) {
    $rows = $_GET['page'] * MAX_DISPLAY_SEARCH_RESULTS_REPORTS - MAX_DISPLAY_SEARCH_RESULTS_REPORTS;
}
$rows = 0;
$products_query_raw = "select p.`products_id`, pd.`products_name`, p.`products_quantity`, p.`products_type` from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.`products_id` = pd.`products_id` and pd.`language_id`='" . $_SESSION['languages_id'] . "' order by p.`products_quantity`, pd.`products_name`";
$products_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_REPORTS, $products_query_raw, $products_query_numrows);
$products = $gBitDb->Execute($products_query_raw);
while (!$products->EOF) {
    // only show low stock on products that can be added to the cart
    if ($zc_products->get_allow_add_to_cart($products->fields['products_id']) == 'Y') {
        $rows++;
        if (strlen($rows) < 2) {
            $rows = '0' . $rows;
        }
        $type_handler = $zc_products->get_admin_handler($products->fields['products_type']);
        $cPath = zen_get_product_path($products->fields['products_id']);
        ?>
              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href='<?php 
        echo zen_href_link_admin($type_handler, '&product_type=' . $products->fields['products_type'] . '&cPath=' . $cPath . '&pID=' . $products->fields['products_id'] . '&action=new_product');
        ?>
'">
                <td class="dataTableContent" align="right"><?php 
        echo $products->fields['products_id'];
        ?>
&nbsp;&nbsp;</td>
                <td class="dataTableContent"><?php 
        echo '<a href="' . zen_href_link_admin(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $products->fields['products_id']) . '">' . $products->fields['products_name'] . '</a>';
        ?>
</td>
                <td class="dataTableContent" align="center"><?php 
        echo $products->fields['products_quantity'];
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:stats_products_lowstock.php


示例4: zen_get_products_base_price

                    $specials_current_price = zen_get_products_base_price($sInfo->products_id);
                } else {
                    $specials_current_price = $sInfo->products_price;
                }
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . zen_href_link(FILENAME_SPECIALS, 'page=' . $_GET['page'] . '&sID=' . $sInfo->specials_id . '&action=delete') . '">' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, 'action=edit&products_filter=' . $sInfo->products_id) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '</a>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($sInfo->specials_date_added));
                $contents[] = array('text' => '' . TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($sInfo->specials_last_modified));
                $contents[] = array('align' => 'center', 'text' => '<br>' . zen_info_image($sInfo->products_image, $sInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
                $contents[] = array('text' => '<br>' . TEXT_INFO_ORIGINAL_PRICE . ' ' . $currencies->format($specials_current_price));
                $contents[] = array('text' => '' . TEXT_INFO_NEW_PRICE . ' ' . $currencies->format($sInfo->specials_new_products_price));
                $contents[] = array('text' => '' . TEXT_INFO_DISPLAY_PRICE . ' ' . zen_get_products_display_price($sInfo->products_id));
                $contents[] = array('text' => '<br>' . TEXT_INFO_AVAILABLE_DATE . ' <b>' . (($specials->fields['specials_date_available'] != '0001-01-01' and $specials->fields['specials_date_available'] != '') ? zen_date_short($specials->fields['specials_date_available']) : TEXT_NONE) . '</b>');
                $contents[] = array('text' => '<br>' . TEXT_INFO_EXPIRES_DATE . ' <b>' . (($specials->fields['expires_date'] != '0001-01-01' and $specials->fields['expires_date'] != '') ? zen_date_short($specials->fields['expires_date']) : TEXT_NONE) . '</b>');
                $contents[] = array('text' => '' . TEXT_INFO_STATUS_CHANGE . ' ' . zen_date_short($sInfo->date_status_change));
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_CATEGORIES, '&action=new_product' . '&cPath=' . zen_get_product_path($sInfo->products_id, 'override') . '&pID=' . $sInfo->products_id . '&product_type=' . zen_get_products_type($sInfo->products_id)) . '">' . zen_image_button('button_edit_product.gif', IMAGE_EDIT_PRODUCT) . '<br />' . TEXT_PRODUCT_EDIT . '</a>');
                $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_SPECIALS, 'action=pre_add') . '">' . zen_image_button('button_select.gif', IMAGE_SELECT) . '<br />' . TEXT_INFO_MANUAL . '</a><br /><br />');
            }
            break;
    }
    if (zen_not_null($heading) && zen_not_null($contents)) {
        echo '            <td width="25%" valign="top">' . "\n";
        $box = new box();
        echo $box->infoBox($heading, $contents);
        echo '            </td>' . "\n";
    }
}
?>
          </tr>
        </table></td>
      </tr>
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:specials.php


示例5: zen_get_category_name

        ?>
</td>
      </tr>

      <tr>
        <td colspan="2"><table border="1" cellspacing="2" cellpadding="4" align="left">
          <tr>
            <td colspan="7" class="main" align="center">
              <?php 
        echo TEXT_PRODUCTS_LISTING . TEXT_PRODUCTS_ID . $products_filter . TEXT_PRODUCT_IN_CATEGORY_NAME . zen_get_category_name(zen_get_products_category_id($products_filter), (int) $_SESSION['languages_id']) . '<br />' . zen_get_products_name($products_filter);
        ?>
            </td>
          </tr>
          <tr>
            <td class="smallText" align="center"><?php 
        echo '<a href="' . zen_href_link(FILENAME_CATEGORIES, 'action=new_product' . '&cPath=' . zen_get_product_path($products_filter) . '&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>';
        ?>
</td>
            <td class="smallText" align="center">
              <?php 
        if ($zc_products->get_allow_add_to_cart($products_filter) == "Y") {
            echo '<a href="' . zen_href_link(FILENAME_PRODUCTS_PRICE_MANAGER, '&products_filter=' . $products_filter . '&current_category_id=' . $current_category_id) . '">' . zen_image_button('button_products_price_manager.gif', IMAGE_PRODUCTS_PRICE_MANAGER) . '<br />' . TEXT_PRODUCTS_PRICE_MANAGER . '</a>';
        } else {
            echo TEXT_INFO_ALLOW_ADD_TO_CART_NO;
        }
        ?>
            </td>
<?php 
        if (zen_has_product_attributes($products_filter, 'false')) {
            ?>
            <td class="smallText" align="center"><?php 
开发者ID:quangn92,项目名称:visualyou,代码行数:31,代码来源:attributes_controller.php


示例6: die

<?php

/**
 * category_icon_display module
 *
 * @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';
开发者ID:ygeneration666,项目名称:ec,代码行数:31,代码来源:category_icon_display.php


示例7: exportPrepareFields

 public function exportPrepareFields(array $fields)
 {
     $fields = parent::exportPrepareFields($fields);
     $products_id = $fields['products_id'];
     $tax_class_id = $fields['products_tax_class_id'];
     unset($fields['products_id'], $fields['products_tax_class_id']);
     $default_language_code = $this->first_language_code;
     global $db;
     if ($this->export_language == 'all') {
         $this->debugMessage('Products::exportPrepareFields, language = ' . $this->export_language . ', default language = ' . $default_language_code . ', sql: ' . $this->saved_data['products_description_sql'] . ', languages: ' . print_r($this->languages, true));
         foreach ($this->languages as $language_code => $language_id) {
             if ($language_code != $default_language_code) {
                 $description_info = $db->Execute(sprintf($this->saved_data['products_description_sql'], $products_id, $language_id));
                 if (!$description_info->EOF) {
                     $encoded_fields = $this->exportEncodeData($description_info->fields);
                     foreach ($encoded_fields as $field_name => $field_value) {
                         if ($field_name != 'products_id' && $field_name != 'language_id') {
                             $fields[$field_name . '_' . $language_code] = $field_value;
                         }
                     }
                 }
             }
         }
     }
     $fields['manufacturers_name'] = zen_get_products_manufacturers_name($products_id);
     $tax_class_info = $db->Execute("SELECT tax_class_title FROM " . TABLE_TAX_CLASS . " WHERE tax_class_id = {$tax_class_id} LIMIT 1");
     $fields['tax_class_title'] = $tax_class_info->EOF ? '' : $tax_class_info->fields['tax_class_title'];
     $cPath_array = explode('_', zen_get_product_path($products_id));
     $default_language_id = $this->languages[DEFAULT_LANGUAGE];
     $categories_name = '';
     foreach ($cPath_array as $next_category_id) {
         $category_info = $db->Execute("SELECT categories_name FROM " . TABLE_CATEGORIES_DESCRIPTION . " WHERE categories_id = {$next_category_id} AND language_id = {$default_language_id} LIMIT 1");
         $categories_name .= ($category_info->EOF ? self::DBIO_UNKNOWN_VALUE : $category_info->fields['categories_name']) . '^';
     }
     $fields['categories_name'] = $this->exportEncodeData(substr($categories_name, 0, -1));
     return $fields;
 }
开发者ID:lat9,项目名称:dbio,代码行数:37,代码来源:DbIoProductsHandler.php


示例8: getZcViewData

 /**
  * Get ZenCart view data.
  */
 public function getZcViewData($request)
 {
     // category path - no support for get_terms_to_filter table. does anybody use that?
     $manufacturerId = $request->query->getInt('manufacturers_id');
     $productId = $request->query->get('products_id');
     $show_welcome = false;
     if ($request->query->has('cPath')) {
         if (!empty($productId) && empty($manufacturerId)) {
             $request->query->set('cPath', zen_get_product_path($productId));
         } elseif (SHOW_CATEGORIES_ALWAYS == '1' && empty($manufacturerId)) {
             $show_welcome = true;
             $request->query->set('cPath', defined('CATEGORIES_START_MAIN') ? CATEGORIES_START_MAIN : '');
         }
     }
     // end category path
     define('PAGE_PARSE_START_TIME', microtime());
     $lng = new \language();
     $languageId = $request->getSession()->getLanguageId();
     // breadcrumb
     $robotsNoIndex = false;
     $validCategories = array();
     $cPathArray = (array) $request->attributes->get('categoryIds');
     foreach ($cPathArray as $categoryId) {
         $category = $this->container->get('categoryService')->getCategoryForId($categoryId, $languageId);
         if (null != $category) {
             $validCategories[] = $category;
         } elseif (SHOW_CATEGORIES_ALWAYS == 0) {
             $robotsNoIndex = true;
             break;
         }
     }
     // ZenMagick does most of the following , we should be able to reuse it.
     $manufacturer = null;
     $manufacturerId = $request->query->getInt('manufacturers_id');
     if (null != $manufacturerId) {
         $manufacturer = $this->container->get('manufacturerService')->getManufacturerForId($manufacturerId, $languageId);
     }
     $product = null;
     if (null != $productId) {
         $product = $this->container->get('productService')->getProductForId($productId);
     }
     $breadcrumb = $this->initCrumbs($validCategories, $manufacturer, $product);
     // end breakdcrumb
     $params = $request->attributes->get('_route_params');
     $canonicalLink = $this->get('router')->generate($request->getRequestId(), $params, true);
     $this_is_home_page = $this->isHomePage();
     $zv_onload = $this->getOnLoadJS();
     $tpl = compact('breadcrumb', 'canonicalLink', 'lng', 'robotsNoIndex', 'show_welcome', 'this_is_home_page', 'zv_onload');
     $tpl['session_started'] = true;
     return $tpl;
 }
开发者ID:zenmagick,项目名称:zenmagick,代码行数:54,代码来源:StorefrontController.php


示例9: _dispatchProduct

 function _dispatchProduct($map, $data)
 {
     $product_id = $data->fields['products_id'];
     $value = '<a href="' . zen_href_link(FILENAME_CATEGORIES, '&action=new_product' . '&cPath=' . zen_get_product_path($data->fields['products_id'], 'override') . '&pID=' . $data->fields['products_id'] . '&product_type=' . zen_get_products_type($data->fields['products_id'])) . '">' . $data->fields['products_name'] . '</a>';
     #$value = $data->fields['products_name'];
     return $value;
 }
开发者ID:quangn92,项目名称:visualyou,代码行数:7,代码来源:wishlist_productlist_class.php


示例10: zen_start_featured

    // auto expire featured products
    require_once DIR_FS_FUNCTIONS . 'featured.php';
    zen_start_featured();
    zen_expire_featured();
    // auto expire salemaker sales
    require_once DIR_FS_FUNCTIONS . 'salemaker.php';
    zen_start_salemaker();
    zen_expire_salemaker();
    $_SESSION['update_expirations'] = 'true';
}
// calculate category path
if (isset($_REQUEST['cPath'])) {
    $cPath = $_REQUEST['cPath'];
} elseif (isset($_REQUEST['products_id']) && !zen_check_url_get_terms()) {
    //	} elseif (isset($_REQUEST['products_id']) && !isset($_REQUEST['manufacturers_id']) && !isset($_REQUEST['music_genres_id'])) {
    $cPath = zen_get_product_path($_REQUEST['products_id']);
} else {
    if (SHOW_CATEGORIES_ALWAYS == '1' && !zen_check_url_get_terms()) {
        $show_welcome = 'true';
        $cPath = defined('CATEGORIES_START_MAIN') ? CATEGORIES_START_MAIN : '';
    } else {
        $show_welcome = 'false';
        $cPath = '';
    }
}
if (zen_not_null($cPath)) {
    $cPath_array = zen_parse_category_path($cPath);
    $cPath = implode('_', $cPath_array);
    $current_category_id = $cPath_array[sizeof($cPath_array) - 1];
} else {
    $current_category_id = 0;
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:application_top.php



注:本文中的zen_get_product_path函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP zen_get_products_actual_price函数代码示例发布时间:2022-05-23
下一篇:
PHP zen_get_product_is_linked函数代码示例发布时间: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