This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die(); | |
require($_SERVER["DOCUMENT_ROOT"] . '/bitrix/modules/main/include/prolog_before.php'); | |
CModule::IncludeModule('sale'); | |
if(empty($_POST['order_id']) or empty($_POST['captcha']) or 0 == preg_match('/^\d*$/', $_POST['order_id'])){ | |
echo <<<RESPONSE | |
<p style="color: #F00; margin: 0;">О заказе с таким номером нам ничего не известно</p> | |
<p>Если у вас остались вопросы, вы можете задать их по телефону:<br> | |
<span>8 800</span> 080-25-05<br> | |
<span>8 707</span> 044-25-45 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
//Исходное состояние кнопки | |
$('#buttonWrapper').click(function(){ | |
$(this).hide(); | |
$('#whatWithMyOrder').css({height: '200px'}); | |
$('#whatWithMyOrder form').show(); | |
$('input[name="order_id"]').focus(); | |
$('input[name="captcha"]').focus(function(){ | |
$('input[name="order_id"]').unbind('focus'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Отправка SMS-уведомления при подтверждении заказа | |
AddEventHandler("sale", "OnSaleStatusOrder", "OnSaleStatusOrderHandler"); | |
function OnSaleStatusOrderHandler($orderID, $statusID){ | |
//Отправка SMS-уведомления при смене статуса заказа | |
switch($statusID){ | |
case 'N': | |
$msg = <<<MSG | |
Ваш заказ #$orderID принят в магазине SibiTron.kz. Спасибо за покупку! | |
MSG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Получение класса [night | morning | afternoon | evening] в зав-сти от часа | |
function getDayClass(hour){ | |
if(hour >= 0 && hour <= 4) | |
return '.night'; | |
else if(hour >= 5 && hour <= 11) | |
return '.morning'; | |
else if(hour >= 12 && hour <= 16) | |
return '.afternoon'; | |
else if(hour >= 17 && hour <= 23) | |
return '.evening'; |