Skip to content

Instantly share code, notes, and snippets.

@igoogle
igoogle / .php
Last active July 30, 2018 10:11
<? require($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php"); ?>
<?
CModule::IncludeModule("sale");
CModule::IncludeModule("catalog");
if (isset($_POST['NAME']) && !empty($_POST['NAME'])) {
$name = $_POST['NAME'];
}
if (isset($_POST['EMAIL']) && !empty($_POST['EMAIL'])) {
// Отправка файла через popup-форму, с помощью ajax
$(document).on('submit', '[data-id="feedback"]', function(e) {
e.preventDefault();
const $t = $(this);
const formData = new FormData($('form[data-id=feedback]')[0]);
$.ajax({
@igoogle
igoogle / bitrix_help.php
Last active March 31, 2018 08:36
Bitrix help
<?php
/* $arLog */
$arLog = [
0 => $post_action,
1 => $post_file_basket_id
];
define("LOG_FILENAME", $_SERVER["DOCUMENT_ROOT"]."/_log.txt");
AddMessage2Log(print_r($arLog, true), "looker");
/* $Request */
$.ajax({
type: 'POST',
url: '',
data: {},
dataType: 'json',
beforeSend: function () {
},
success: function (res) {
@igoogle
igoogle / tarifs.html
Created February 27, 2018 10:23
test
<header class="section__header">
<div class="container-fluid">
<h2 class="section__title">Тарифные планы</h2>
<p class="section__lead">Центр превентивной медицины</p>
</div>
</header>