$loe .= '<input type="hidden" id="el-copy-lists" value="' . implode(",", $el_used_lists) . '" />';
        } else {
            $loe = '<span class="bold red">Elements Used Not Found !</span>';
        }
        $result = array();
        $result['loe'] = $loe;
        ajaxReturn($result);
        exit;
    } elseif ($_POST['me_action'] == 'COPYELEMENTS') {
        $pid_to_applied = tep_db_prepare_input($_POST['pid']);
        $pid_to_copied = tep_db_prepare_input($_POST['pidcopy']);
        $el_id_excluded = tep_db_prepare_input($_POST['elidexcluded']);
        $elidcopy = tep_db_prepare_input($_POST['elidcopy']);
        $qtycopy = tep_db_prepare_input($_POST['qtycopy']);
        //        $el_added = $class_pm->addElementToProducts($pid_to_applied, $elidcopy, $qtycopy);
        $class_pm->copyFromProducts($pid_to_copied, $pid_to_applied, 'eu', $el_id_excluded);
        echo utf8_encode("{$pid_to_copied}-{$pid_to_applied}");
        exit;
    }
}
//TEMPLATE
$eu_p = $class_pm->retrieveDetail($products_id, 'p,pd,pei');
$content .= '<div class="ui-corner-all" style="text-align:center;position:fixed;left:10px;width:212px;padding:5px;">';
if ($is_accessed_from_design_mgmt) {
    use_class('design_draft');
    $draft = new design_draft(null, $products_id);
    $content .= webImageWithDetailLink($draft->image_1, IMAGE_SIZE_THUMBNAIL_3, IMAGE_SIZE_THUMBNAIL_3, 'Product ' . $products_id, 'img-border');
} else {
    $content .= webImageWithDetailLink($eu_p['p']['products_image'], IMAGE_SIZE_THUMBNAIL_3, IMAGE_SIZE_THUMBNAIL_3, 'Product ' . $products_id, 'img-border');
    $content .= '<div style="width:100%;float:left;">';
    foreach ($eu_p['pei'] as $peid => $products_extra_images) {
예제 #2
0
     exit;
 } elseif ($_POST['me_action'] == 'DRAFTCREATEPRODUCT') {
     use_class('products_minierp');
     $class_pm = new products_minierp();
     $drafts_id = tep_db_prepare_input($_POST['drafts_id']);
     $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, '&amp;designs_id=' . $designs_id);
     $result = array();
     $result['product'] = $product;
     $result['designs_id'] = $draft->designs_id;