当前位置: 首页>>代码示例>>PHP>>正文


PHP products_minierp::loadColorPatternNames方法代码示例

本文整理汇总了PHP中products_minierp::loadColorPatternNames方法的典型用法代码示例。如果您正苦于以下问题:PHP products_minierp::loadColorPatternNames方法的具体用法?PHP products_minierp::loadColorPatternNames怎么用?PHP products_minierp::loadColorPatternNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在products_minierp的用法示例。


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

示例1: Product

$row[] = 'Diamond Certificate Type';
$table[] = $row;
foreach ($preorder->items as $i) {
    $pid = $i['products_id'];
    $aid = $i['articles_id'];
    $pdata = $class_pm->retrieveDetail($pid, 'p,pd,pd2,pnc,cat');
    $obj_product = new Product($pid);
    $adata = $aid == 0 ? null : $class_pa->retrieveDetail($aid);
    if (is_null($adata)) {
        $ean = $pdata['p']['products_ean'];
        $length = $pdata['pnc']['products_length'];
    } else {
        $ean = $adata['products_ean'];
        $length = $adata['length'];
    }
    $colors = $class_pm->loadColorPatternNames($pid, '2');
    $colors_main = '';
    if (is_array($colors)) {
        foreach ($colors as $c) {
            $colors_main = $c;
            break;
        }
    } else {
        $colors = array();
    }
    $materials_ids = $class_pm->loadProductMaterials($pid);
    $materials = array();
    foreach ($materials_ids as $mid) {
        $materials[] = $materials_name[$mid];
    }
    $pues = $class_pm->retrieveElementsUsage($pid, 0);
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:buyvip-list.php

示例2: count

 //CATEGORY CHECK
 if ($category_name == '' || $category_name == 'No Category Name') {
     $product_errors[] = 'Product Category is not yet set';
 }
 //SUBCATEGORY CHECK
 $subcat_group = $category->getCategoryTop()->getSubCategoryGroup();
 $attributes = $class_s->getProductStyles($pid);
 $subcategory = $attributes[$subcat_group];
 $subcattotal = count($subcategory);
 if ($subcattotal == 0) {
     $product_errors[] = 'Product has no Subcategory';
 } elseif ($subcattotal > 1) {
     $product_errors[] = 'Product can only have 1 Subcategory';
 }
 //COLORS CHECK
 $pdata['colors'] = $class_pm->loadColorPatternNames($pid, $lid);
 $pdata['colors_total'] = count($pdata['colors']);
 $include_neon = isset($pdata['colors']['22']);
 //ID 22 = neon
 $color_reject1 = !$include_neon && $pdata['colors_total'] > 1;
 $color_reject2 = $include_neon && $pdata['colors_total'] > 2;
 if ($color_reject1 || $color_reject2) {
     $product_errors[] = 'Product has more than 1 color' . '(and 1 of them is not neon)';
 } else {
     //now check if we have duplicate colors
     $color_ids = array_keys($pdata['colors']);
     sort($color_ids);
     $color_key = implode('-', $color_ids);
     if (in_array($color_key, $family_colors)) {
         $product_errors[] = 'Family has already a product ' . 'with the same color';
     } else {
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:tradebyte-catalog-uploader.php

示例3: array

         if ($sp_languages_id == $languages_id) {
             $sda = array();
             $sda['name'] = $name;
             $sda['description'] = $description;
             $sda['products_selling_points'] = $sellingpointsamde;
             $sda['short_name'] = $shortname;
             $sda['promo_name'] = $promoname;
             $sda['keywords'] = $keywords;
             $class_jc->updateField($catalog_id, $sda);
         }
     }
     //disabled this, now its already handled on class products_minierp on each functions that possible need image reupload
     //reupload changes to ot.de and am.vd
     //tep_db_query("UPDATE jng_sp_catalog SET image_uploaded='0' WHERE jng_sp_id IN (2,5) AND products_id=$products_id");
     $pdata = $class_pm->retrieveDetail($products_id, 'p,cat');
     $products_colors = $class_pm->loadColorPatternNames($products_id, $languages_id);
     use_class('products_brand');
     $class_pb = new products_brand();
     $products_brand = $class_pb->retrieveDetail($pdata['p']['products_brand_id']);
     $result = array();
     $result['languages_id'] = $languages_id;
     $result['keywords'] = $keywords;
     $result['autokw-amvd'] = addAutoKeywords($keywords, 188, $name, $products_colors);
     $result['autokw-otde'] = otdeAutoKeywords($name, strtoupper($products_brand['brand_name']), $class_pm->retrieveCategoryName($pdata['categories_id'], '2'));
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == "SAVECOLORS") {
     $color_pattern_id = $_POST['colors'] == '' ? array() : explode(',', $_POST['colors']);
     $class_pm->setColorPattern($products_id, $color_pattern_id);
     $q = tep_db_query("SELECT jng_sp_catalog_id, jng_sp_id FROM jng_sp_catalog WHERE products_id={$products_id}");
     $sp_list = array();
开发者ID:blasiuscosa,项目名称:manobo-2008,代码行数:31,代码来源:product-detail-description1.php


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