예제 #1
0
            $P = array("ARTNUMBER" => $NAME, "BRAND_REF" => $BRAND_REF, "TB_SERIES" => $TB_SERIES, "TB_WIDTH" => $TB_WIDTH, "TB_HEIGHT" => $TB_HEIGHT, "TB_DEPTH" => $TB_DEPTH, "TB_PANELS" => $TB_PANELS, "TB_DBK_COOL" => emptyOrValue($row[5], 130), "TB_DBK_HEAT" => emptyOrValue($row[6], 132), "TB_RESH" => emptyOrValue($row[8], 134), "TB_FAN" => emptyOrValue($row[9 + 1], 136), "TB_FAN_RESH" => emptyOrValue($row[10 + 1], 138), "TB_DIN_ROZ" => emptyOrValue($row[11 + 1], 140), "TB_DIN_AUTO" => emptyOrValue($row[12 + 1], 1142), "TB_KLEMM" => emptyOrValue($row[13 + 1], 144), "TB_DIN_METIZ" => emptyOrValue($row[14 + 1], 146), "TB_UTEPLITEL" => emptyOrValue($row[15 + 1], 148), "TB_OPTION" => $TB_OPTION, "TP_IP_CLASS" => $TP_IP_CLASS, "TP_HEAT_POWER" => $TP_HEAT_POWER, "MORE_PHOTO" => $MORE_PHOTO);
        }
        $PRICE_EUR = floatval($PRICE_EUR) * $price_multiplier;
        if ($w * $w + $h * $h + $d * $d != 0) {
            add_element($iblock_id, $section_id, $series_title_prefix . " " . $NAME, $PRICE_EUR, $P, $DETAIL_PICTURE);
        } else {
            echo "Не добавлен!<br>";
            echo $w . " " . $h . " " . $d . "<br>";
        }
    }
}
clear_section(4, 40);
//Удалить все элементы из серии IB
clear_section(4, 39);
//Удалить все элементы из серии IBL
clear_section(4, 41);
//Удалить все элементы из серии IBV
clear_section(4, 17);
//Удалить все элементы из серии T
clear_section(4, 19);
//Удалить все элементы из серии TL
clear_section(4, 18);
//Удалить все элементы из серии VT
echo "Очищены разделы каталога T, TL, VT, IB, IBV, IBL<br>";
add_elements_from_file("seriesT.csv", 4, 17, "T", "Термобокс ", 1);
add_elements_from_file("seriesTL.csv", 4, 19, "TL", "Термобокс ", 1);
add_elements_from_file("seriesVT.csv", 4, 18, "VT", "Термобокс ", 1);
add_elements_from_file("seriesT.csv", 4, 40, "IB", "Термобокс ", 1.15);
add_elements_from_file("seriesTL.csv", 4, 39, "IBL", "Термобокс ", 1.15);
add_elements_from_file("seriesVT.csv", 4, 41, "IBV", "Термобокс ", 1.15);
예제 #2
0
        } elseif ($row[1] == "21-35") {
            $TP_IP_CLASS = 167;
        }
        //Раннев сказал везде делать 31
        $TP_IP_CLASS = 168;
        $ARTNUMBER = "arm19" . "-" . $w / 10 . $h / 10 . $d . "_" . $TP_IP_CLASS;
        $NAME = $row[0];
        $MORE_PHOTO = array();
        $MORE_PHOTO_2D = array();
        if ($h > 1100) {
            $DETAIL_PICTURE = CFile::MakeFileArray("images/19inch/shkaf3.jpg");
            $MORE_PHOTO[] = array();
        } else {
            $DETAIL_PICTURE = CFile::MakeFileArray("images/19inch/shkaf1.jpg");
            $MORE_PHOTO[] = array(CFile::MakeFileArray("images/19inch/shkaf2.jpg"));
        }
        $TB_SERIES = "";
        $P = array("ARTNUMBER" => $ARTNUMBER, "BRAND_REF" => $BRAND_REF, "TB_SERIES" => $TB_SERIES, "TB_WIDTH" => $TB_WIDTH, "TB_HEIGHT" => $TB_HEIGHT, "TB_DEPTH" => $TB_DEPTH, "TP_IP_CLASS" => $TP_IP_CLASS, "MORE_PHOTO" => $MORE_PHOTO, "DESCRIPTION_TEXT" => $row[5]);
        $PRICE_EUR = floatval($PRICE_EUR) * $price_multiplier;
        if ($w * $w + $h * $h + $d * $d != 0) {
            test_dump(array($iblock_id, $section_id, $series_title_prefix . " " . $NAME, $PRICE_EUR, $P, $DETAIL_PICTURE));
            add_element($iblock_id, $section_id, $series_title_prefix . " " . $NAME, $PRICE_EUR, $P, $DETAIL_PICTURE);
        } else {
            echo "Не добавлен!<br>";
            echo $w . " " . $h . " " . $d . "<br>";
        }
    }
}
clear_section("4", "29");
add_elements_from_file("series19.csv", "4", "29", "19\"", "Термошкафы антивандальные ", 1, array());
예제 #3
0
            $P = array("ARTNUMBER" => $NAME, "BRAND_REF" => $BRAND_REF, "SERIES" => $TB_SERIES, "WIDTH" => $TB_WIDTH, "HEIGHT" => $TB_HEIGHT, "DEPTH" => $TB_DEPTH, "PANELS" => $TB_PANELS, "VENTILACIA" => $common_options["VENTILACIA"], "DBK_HEAT" => emptyOrValue($row[6], 132), "RESH" => emptyOrValue($row[8], 134), "FAN" => emptyOrValue($row[9 + 1], 136), "FAN_RESH" => emptyOrValue($row[10 + 1], 138), "DIN_ROZ" => emptyOrValue($row[11 + 1], 140), "DIN_AUTO" => emptyOrValue($row[12 + 1], 1142), "KLEMM" => emptyOrValue($row[13 + 1], 144), "DIN_METIZ" => emptyOrValue($row[14 + 1], 146), "UTEPLITEL" => emptyOrValue($row[15 + 1], 148), "OPTION" => $TB_OPTION, "IP_CLASS" => $TP_IP_CLASS, "HEAT_POWER" => $TP_HEAT_POWER, "MORE_PHOTO" => $MORE_PHOTO);
        }
        $PRICE_EUR = floatval($PRICE_EUR) * $price_multiplier;
        if ($w * $w + $h * $h + $d * $d != 0) {
            add_element($iblock_id, $section_id, $series_title_prefix . " " . $NAME, $PRICE_EUR, $P, $DETAIL_PICTURE);
        } else {
            echo "Не добавлен!<br>";
            echo $w . " " . $h . " " . $d . "<br>";
        }
    }
}
clear_section(4, 40);
//Удалить все элементы из серии IB
clear_section(4, 39);
//Удалить все элементы из серии IBL
clear_section(4, 41);
//Удалить все элементы из серии IBV
clear_section(4, 17);
//Удалить все элементы из серии T
clear_section(4, 19);
//Удалить все элементы из серии TL
clear_section(4, 18);
//Удалить все элементы из серии VT
echo "Очищены разделы каталога T, TL, VT, IB, IBV, IBL<br>";
add_elements_from_file("seriesT.csv", 4, 17, "T", "Термошкаф ", 1, array("VENTILACIA" => 130));
add_elements_from_file("seriesTL.csv", 4, 19, "TL", "Термошкаф ", 1, array("VENTILACIA" => 163));
add_elements_from_file("seriesVT.csv", 4, 18, "VT", "Термошкаф ", 1, array("VENTILACIA" => 162));
add_elements_from_file("seriesT.csv", 4, 40, "IB", "Термошкаф ", 1.15, array("VENTILACIA" => 130));
add_elements_from_file("seriesTL.csv", 4, 39, "IBL", "Термошкаф ", 1.15, array("VENTILACIA" => 163));
add_elements_from_file("seriesVT.csv", 4, 41, "IBV", "Термошкаф ", 1.15, array("VENTILACIA" => 162));