There is a form with select
<form action="" method="POST"> <select name="pay_method"> <option value="price_nal">Наличные</option> <option value="price_beznal">Безналичные</option> </select> <button type="submit" name="calc" id="calc">Пересчитать...</button> </form>
When you select any item and click the "Recalculate" button, the following happens:
if(isset($_POST['pay_method']) and $_POST['pay_method'] != '') { //Удаляем текующую сессию с информацией о способе оплаты $this->session->delete('price'); $this->session->set('price', $_POST['pay_method']); } //Перерасчет суммы и стоимостей товаров $this->_calc($_POST);
Help to realize the following: what would happen when choosing "Cash" or "Cashless" the same as when you click "Recalculate"