Answer the question
In order to leave comments, you need to log in
Bitrix "product in the cart" when adding, how to do?
Hello, such a question
In the bitrix of the small business edition, there is a button for adding an item to the cart (in the list of products)
When you click on the button, a modal window pops up with a notification that the item has been added to the cart
What I want to do is that when you click "add Add to Cart", the button changed to "In Cart"
Add product code:
<a class="btn btn-default to_basket <?=$buttonSizeClass?>" id="<?=$itemIds['BUY_LINK']?>"
href="javascript:void(0)" rel="nofollow">
<?=($arParams['ADD_TO_BASKET_ACTION'] === 'BUY' ? $arParams['MESS_BTN_BUY'] : $arParams['MESS_BTN_ADD_TO_BASKET'])?>
</a>
<script>
$(document).ready(function () {
$('.to_basket').click(function () {
$(this).addClass('in_basket');
$(this).text("В корзине");
});
});
</script>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question