當前位置: 首頁>>代碼示例>>PHP>>正文


PHP products_minierp::saveLength方法代碼示例

本文整理匯總了PHP中products_minierp::saveLength方法的典型用法代碼示例。如果您正苦於以下問題:PHP products_minierp::saveLength方法的具體用法?PHP products_minierp::saveLength怎麽用?PHP products_minierp::saveLength使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在products_minierp的用法示例。


在下文中一共展示了products_minierp::saveLength方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: elseif

     $class_pb->updateProductBrand($products_id, $brand_id);
     echo utf8_encode("UPDATED");
     exit;
 } elseif ($_POST['me_action'] == 'LOADLENGTHS') {
     $products_id = tep_db_prepare_input($_POST['products_id']);
     $result = drawLengthsForm($products_id);
     echo utf8_encode($result);
     exit;
 } elseif ($_POST['me_action'] == 'SAVELENGTHS') {
     use_class('products_ean');
     $class_ean = new products_ean();
     $products_id = tep_db_prepare_input($_POST['products_id']);
     $def_length = tep_db_prepare_input($_POST['def_length']);
     $add_length = tep_db_prepare_input($_POST['add_length']);
     $upd_length = tep_db_prepare_input($_POST['upd_length']);
     $class_pm->saveLength($products_id, $def_length, $add_length);
     if (is_array($upd_length) && count($upd_length) > 0) {
         foreach ($upd_length as $paid => $l) {
             if ($l > 0 && $l != 'NaN') {
                 $class_pa->update($paid, 0, 0, array('length' => $l), true);
             } else {
                 $a_ean = $class_ean->getEAN($products_id, $paid);
                 if ($a_ean != '') {
                     $class_ean->setAsFree($a_ean);
                 }
                 $class_pa->remove($paid, true);
             }
         }
     }
     //$result = drawLengthsForm($products_id);
     $result = 'UPDATED';
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:designs-details.php

示例2: unset

     $designs_id = tep_db_prepare_input($_POST['designs_id']);
     $product_name = tep_db_prepare_input($_POST['product_name']);
     $product_desc = tep_db_prepare_input($_POST['product_desc']);
     $product_length = tep_db_prepare_input($_POST['product_length']);
     $product_add_length = tep_db_prepare_input($_POST['product_add_length']);
     $pid_el_copy = tep_db_prepare_input($_POST['product_el_copy']);
     $draft = new design_draft($drafts_id);
     $products_id = $draft->createProduct($product_name, $product_desc);
     //COPY FROM EXISTING PRODUCTS FROM SAME DRAFT
     if ($pid_el_copy > 0) {
         $class_pm->copyFromProducts($pid_el_copy, $products_id, 'l,eu', '', true);
     } else {
         if (isset($product_add_length[$product_length])) {
             unset($product_add_length[$product_length]);
         }
         $class_pm->saveLength($products_id, $product_length, $product_add_length);
     }
     //        if($product_length>0) {
     //            if(isset($product_add_length[$product_length])) unset($product_add_length[$product_length]);
     //            $class_pm->saveLength($products_id, $product_length, $product_add_length);
     //        }
     //        $product = productLinkManageElementsUsed($products_id, $product_name);
     $product = productLinkWithID($products_id, $product_name, '&designs_id=' . $designs_id);
     $result = array();
     $result['product'] = $product;
     $result['designs_id'] = $draft->designs_id;
     $result['drafts_id'] = $draft->id;
     $result['products_id'] = $products_id;
     ajaxReturn($result);
     exit;
 } elseif ($_POST['me_action'] == 'DELETEPRODUCT') {
開發者ID:blasiuscosa,項目名稱:manobo-2008,代碼行數:31,代碼來源:designs-manage.php


注:本文中的products_minierp::saveLength方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。