本文整理汇总了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';
示例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') {