M
M
mills2019-05-12 08:32:05
1C-Bitrix
mills, 2019-05-12 08:32:05

Solution "Kiosk" how to empty the trash with one click?

Good afternoon!
Maybe someone implemented a similar button for clearing the basket with the "Kiosk" solution with one click?
Clear one item button:

<button style="background-color: #fff0;border: 0;cursor: pointer;" class="basket__icon basket__icon" onclick="$('#order').attr('name', 'no_order'); $('#calculate').attr('name', 'calculate'); $('#del_<?=$k?>').attr('name', 'del[]');"></button>

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton, 2019-05-14
@anton99zel

I'm sorry it won't work for you. You have Start:
In init.php

<?
if ($_POST["BasketDelete"] and CModule::IncludeModule("sale"))
{
CSaleBasket::DeleteAll(CSaleBasket::GetBasketUserID());
}
?>

To the page
<input style="background-color: #fff0;border: 0;cursor: pointer;" class="basket__icon basket__icon"  type="submit" value="Очистить корзину" name="BasketDelete">

S
Sergey, 2019-05-16
@oldzas

I'm not sure, but: it seems to me that the entire basket is stored in the session, find out its name and reset

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question