Если товар в корзине, поменять кнопку "В корзину" на "В корзине"

<?
$dbBasketItems = CSaleBasket::GetList(
array(
"NAME" => "ASC",
"ID" => "ASC"
),
array(
"FUSER_ID" => CSaleBasket::GetBasketUserID(),
"LID" => SITE_ID,
"PRODUCT_ID" => $arOffer['ID'], //ID текущего товара
"ORDER_ID" => "NULL",
"DELAY" => "N" //Исключая отложенные
),
false,
false,
array("PRODUCT_ID")
);
while ($arItemsBasket = $dbBasketItems->Fetch()) {
$itInBasket = $arItemsBasket['PRODUCT_ID'];
}
?>
<? if (isset($itInBasket)) { ?>
<a href="/personal/mycart/"><div class="busk-act"></div></a>
<?} else {?>
<form action="<?=POST_FORM_ACTION_URI?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="<?echo $arParams["ACTION_VARIABLE"]?>" value="BUY">
<input type="hidden" name="<?echo $arParams["PRODUCT_ID_VARIABLE"]?>" value="<?echo $arOffer["ID"]?>">
<input type="submit" class="buybutsmall" name="<?echo $arParams["ACTION_VARIABLE"]."ADD2BASKET"?>" value="">
</form>
<?}
unset( $itInBasket);
?>


Возврат к списку


-----
-----