add sendmail in orders
This commit is contained in:
@@ -19,9 +19,10 @@
|
||||
<?if ($book['sub'] == 1):?>
|
||||
<p class="price"><a href="<?=$link_subscript?>">Доступ к библиотеке за 490 руб. в год</a></p>
|
||||
<?endif?>
|
||||
<?if ($book['offline_price'] > 0):?>
|
||||
<p class="price"><a href="<?=$link_offline?>">Бумажная за <?=$book['offline_price']?> руб.</a></p>
|
||||
<?endif?>
|
||||
<?if ($book['offline_price'] > 0 && $book['pieces'] > 0):?>
|
||||
<p class="price"><a href="<?=$link_offline?>">Бумажная за <?=$book['offline_price']?> руб.</a></p>
|
||||
<?endif?>
|
||||
|
||||
<?endif?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,24 +1,106 @@
|
||||
|
||||
<script>
|
||||
|
||||
var product_price = <?=$price?>;
|
||||
|
||||
|
||||
function devilery_check(myRadio){
|
||||
|
||||
var itog = product_price;
|
||||
var itog_el = document.getElementById("span_itog");
|
||||
|
||||
if (myRadio.value == 2){
|
||||
itog = product_price;
|
||||
document.getElementById("form_adress").style.visibility='hidden';
|
||||
document.getElementById("form_samo").style.visibility='visible';
|
||||
}
|
||||
else if(myRadio.value == 3){
|
||||
itog = product_price + 300;
|
||||
document.getElementById("form_adress").style.visibility='visible';
|
||||
document.getElementById("form_samo").style.visibility='hidden';
|
||||
}
|
||||
|
||||
itog_el.innerHTML = itog + ' руб.';
|
||||
|
||||
}
|
||||
|
||||
|
||||
<?if (isset($error_price)):?>
|
||||
<p style="color: red;">Просим прощения, но такой товар не найден!</p>
|
||||
<?else:?>
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<form id="clientform" class="clientform" action="<?=$submit_link?>" method="POST">
|
||||
|
||||
<?if (isset($error_mail)):?>
|
||||
<p style="color: red;">Неверный адрес электронной почты</p>
|
||||
<?endif?>
|
||||
|
||||
<?if (isset($errors)):?>
|
||||
<div id="errors">
|
||||
<?foreach($errors as $err):?>
|
||||
<p style="color: red;"><?=$err?></p>
|
||||
<?endforeach?>
|
||||
</div>
|
||||
<?endif?>
|
||||
|
||||
|
||||
<p><label for="clientmail">Для покупки этого товара введите свой электронный адрес ниже:</label></p>
|
||||
<p><input type="email" id="clientemail" name="clientmail"></p>
|
||||
<p><label>Нажимая кнопку «Купить», я соглашаюсь <a href="https://argumenti.ru/subscribe_condition">с условиями подписки</a></label></p>
|
||||
<p><label for="clientmail">Ваш электронный адрес:</label><br>
|
||||
<em>Куда придет информация о заказе</em>
|
||||
</p>
|
||||
|
||||
<p><input type="email" id="clientemail" name="clientmail" value="<?=post_value("clientmail")?>"></p>
|
||||
|
||||
<?if($delivery_id > 1):?>
|
||||
|
||||
<p><label for="buy_adress">Ваше имя:</label><br></p>
|
||||
<p><input id="buy_name" name="buy_name" value="<?=post_value("buy_name")?>"></p>
|
||||
|
||||
<p><label for="buy_tel">Телефон для связи:</label><br>
|
||||
<em>Для подтверждения заказа</em>
|
||||
</p>
|
||||
<p><input id="buy_tel" name="buy_tel" value="<?=post_value("buy_tel")?>"></textarea></p>
|
||||
|
||||
<p><label for="devilery_id">Доставка:</label></p>
|
||||
|
||||
<?foreach($delivery as $ditem):?>
|
||||
<?$dd++;
|
||||
$checked = ($ditem['delivery_id'] == $delivery_id) ? ' checked': '';?>
|
||||
<p><input name="delivery_id" type="radio" id="devilery_id<?=$dd?>" onclick="devilery_check(this);" value="<?=$ditem['delivery_id']?>"<?=$checked?>>
|
||||
<?=$ditem['delivery']?>
|
||||
<?if ($ditem['delivery_price'] > 0):?>
|
||||
+ <?=$ditem['delivery_price']?> руб.
|
||||
<?endif?>
|
||||
</p>
|
||||
<?endforeach?>
|
||||
|
||||
<div id="form_samo" style="visibility: <?= ($delivery_id == 2) ? 'visible' : 'hidden' ?>;">
|
||||
<p>Адрес:</p>
|
||||
<p>Москва, Авиационный переулок, д. 4А</p>
|
||||
</div>
|
||||
|
||||
<div id="form_adress" style="visibility: <?= ($delivery_id == 3 or $delivery_id == 4) ? 'visible' : 'hidden' ?>;">
|
||||
<p><label for="buy_adress">Адрес:</label></p>
|
||||
<p><textarea id="buy_adress" name="buy_adress" placeholder="Адрес в свободной форме" value="<?=post_value("buy_adress")?>"></textarea></p>
|
||||
</div>
|
||||
|
||||
<div id="form_pay">
|
||||
<p><label for="buy_adress">Оплата:</label></p>
|
||||
<?foreach($pay_ids as $pkey=>$pitem):?>
|
||||
<?$p++;
|
||||
$pchecked = ($pkey == $pay_id) ? ' checked': '';?>
|
||||
<p><input name="pay_id" type="radio" value="<?=$pkey?>" id="pay_id<?=$p?>" <?=$pchecked?>><?=$pitem?></p>
|
||||
<?endforeach?>
|
||||
</div>
|
||||
|
||||
<div id="form_itog">
|
||||
<strong>Общая сумма:</strong> <span id="span_itog"><?=$price?> руб.</span></p>
|
||||
</div>
|
||||
|
||||
|
||||
<?endif?>
|
||||
|
||||
<p><label>Нажимая кнопку «Купить», я соглашаюсь <a href="https://argumenti.ru/subscribe_condition">с условиями получения услуги</a></label></p>
|
||||
<p><input type="submit" id="submit" value="Купить"></p>
|
||||
|
||||
</form>
|
||||
|
||||
<?endif?>
|
||||
|
||||
|
||||
|
||||
|
||||
45
app/views/order_status.phtml
Normal file
45
app/views/order_status.phtml
Normal file
@@ -0,0 +1,45 @@
|
||||
<h1>Номер заказа <?=$order_id?></h1>
|
||||
|
||||
<?if (isset($buy_id['buy_id'])):?>
|
||||
|
||||
<p>Запомните номер заказа, чтобы при необходимости сообщить его менеджеру</p>
|
||||
|
||||
|
||||
<p> <strong>Статус оплаты:</strong>
|
||||
|
||||
<?if ($buy_id['buy_status'] == 1):?>
|
||||
Спасибо мы получили от Вас оплату.
|
||||
<?else:?>
|
||||
Заказ неоплачен.
|
||||
<?if ($buy_id['delivery_id'] == 1 && $buy_id['shop_id'] !== '' ):?>
|
||||
Свяжитесь с менеджером, чтобы оплатить его.
|
||||
<?else:?>
|
||||
Вы сможете оплатить заказ при получении.
|
||||
<?endif?>
|
||||
<?endif?>
|
||||
|
||||
|
||||
|
||||
</p>
|
||||
|
||||
<p> <strong>Доставка:</strong>
|
||||
|
||||
<?if ($buy_id['delivery_id'] == 1):?>
|
||||
Указана электронная почта или личный кабинет
|
||||
<?elseif ($buy_id['delivery_id'] == 2):?>
|
||||
Выбран самовывоз по адресу - Москва, Авиационный переулок, д. 4А
|
||||
<?elseif ($buy_id['delivery_id'] == 3):?>
|
||||
Доставка по указанному адресу. С Вами свяжется наш менеджер.
|
||||
<?endif?>
|
||||
|
||||
</p>
|
||||
|
||||
<?else:?>
|
||||
|
||||
<p>Извините, но такой заказ еще не сформирован</p>
|
||||
|
||||
<?endif?>
|
||||
|
||||
|
||||
|
||||
<a href="<?=SITE?>">Перейти в КЛАН</a>
|
||||
Reference in New Issue
Block a user