<form action="" method="POST">
<?
if (CModule::IncludeModule("iblock")):
// ID инфоблока из которого выводим элементы
$iblock_id = 8;
$my_slider = CIBlockElement::GetList (
// Сортировка элементов
Array("CATALOG_PRICE_1" => "ASC"),
Array('ACTIVE' => 'Y', "IBLOCK_ID" => $iblock_id, "SECTION_ID" => 109,
"INCLUDE_SUBSECTIONS" => "Y",
"PROPERTY_OPTICAL_POWER_VALUE" => $_POST['OPTICAL_POWER'],
"PROPERTY_LENS_INDEX_VALUE" => $_POST['LENS_INDEX'],
"PROPERTY_TINTED_VALUE" =>$_POST['TINTED'],
"PROPERTY_COATING_VALUE" =>$_POST['COATING'],
"PROPERTY_DESIGN_VALUE" =>$_POST['DESIGN'],
),
false,
false,
// Перечисляесм все свойства элементов, которые планируем выводить
Array(
'ID',
'NAME',
'PREVIEW_PICTURE',
'DETAIL_PAGE_URL',
//'PROPERTY_OPTICAL_POWER',
//'PROPERTY_LENS_INDEX',
//'PROPERTY_TINTED',
//'PROPERTY_COATING',
//'PROPERTY_DESIGN',
'CATALOG_PRICE_1',
'CATALOG_GROUP_1',
)
);
$i = 0;
while($ar_fields = $my_slider->GetNext())
{
if($i < 5)
{
$english_format_number = number_format
($ar_fields['CATALOG_PRICE_1'], 0, '.', '');
$img_path = CFile::GetPath($ar_fields["PREVIEW_PICTURE"]);
echo "<div id='karta'></br><img src='{$img_path}'width='150' height='90' >";
echo "<p class='kartap'><span style='color: green'>
<a class='ss' target='_blank' href='{$ar_fields['DETAIL_PAGE_URL']}'>
{$ar_fields['NAME']}</a>
</br><p class='kartap2'>
{$english_format_number} РУБ.</p>
</span></p></div>";
}
else
{
$english_format_number = number_format($ar_fields['CATALOG_PRICE_1'], 0, '.', '');
//echo " (".$ar_fields['PROPERTY_OPTICAL_POWER_VALUE'].")";
//echo " (".$ar_fields['PROPERTY_LENS_INDEX_VALUE'].")";
//echo " (".$ar_fields['PROPERTY_TINTED_VALUE'].")";
//echo " (".$ar_fields['PROPERTY_COATING_VALUE'].")";
//echo " (".$ar_fields['PROPERTY_DESIGN_VALUE'].")";
echo "<div id='karta5'><input type='radio' class='LENS'
value='{$ar_fields['ID']}' name='LENS' id='{$ar_fields['ID']}'/>
<label for='{$ar_fields['ID']}'><span style='color: red'>
Арт. №{$ar_fields['ID']} - {$ar_fields['NAME']} -
{$english_format_number} РУБ.</span></label></div>";
}
$i++;
}
endif;
?>
<input type="text" value="1" class="order-input order-input-small"
name="order-count">
<input type="submit" value="Заказать" class="order-btn-small">
</form>
<?
$PRODUCT_ID = $_POST['LENS'];
if (CModule::IncludeModule("catalog")) {
if ($_POST['order-count']) {
Add2BasketByProductID(
$PRODUCT_ID,
$_POST['order-count'],
false
);
LocalRedirect("/personal/cart/");
}
}
?>
Как будто бы в $PRODUCT_ID = $_POST['LENS'] не приходит айдишник валуе.