1С-Битрикс
25
Вклад в тег
function containerWidth() {
global $APPLICATION;
ob_start();
if(strlen($APPLICATION->GetProperty('fullWidthContainer')) > 0) {
echo 'container-fluid';
} else {
echo 'container';
}
$result = ob_get_contents();
ob_end_clean();
return $result;
}
<div class="<?$APPLICATION->AddBufferContent("containerWidth");?>">
$APPLICATION->SetPageProperty("fullWidthContainer", "1");
$orderObj = Sale\Order::load($order['ORDER']['ID']);
$paymentCollection = $orderObj->getPaymentCollection();
$payment = $paymentCollection[0];
$service = Sale\PaySystem\Manager::getObjectById($payment->getPaymentSystemId());
$context = \Bitrix\Main\Application::getInstance()->getContext();
$service->initiatePay($payment, $context->getRequest());
<?$APPLICATION->IncludeComponent(
"bitrix:sale.order.payment",
"",
Array(
)
);?>
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php");
$APPLICATION->SetTitle("Оплата заказа");
ob_start();
?>
<?$APPLICATION->IncludeComponent(
"bitrix:sale.order.payment",
"",
Array(
)
);?>
<?
$formPay = ob_get_contents();
ob_end_clean();
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_after.php");
$APPLICATION->SetTitle("Оплата заказа");
?>
<div class="formPayment">
<?
echo $formPay;
?>
</div>
<?require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");?>
<a class="update" data-id='<?=$arItem['ID']?>' href="">Ссылка примерного вида</a>
$(".update").click(function(event) {
var id = $(this).attr('data-id');
$.ajax({
url: '/path/to/file',
type: 'post',
data: {id: id},
})
.done(function() {
console.log("success");
})
.fail(function() {
console.log("error");
})
.always(function() {
console.log("complete");
});
});
<?
include($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php");
if(\Bitrix\Main\Loader::includeModule('iblock')) {
$newEl = new CIBlockElement;
$elProps = array(
"MODIFIED_BY" => $USER->GetID(),
"IBLOCK_ID" => 3,
"ACTIVE_FROM" => ConvertTimeStamp(time(), "FULL"),
"ACTIVE" => "Y",
);
$res = $newEl->Update($_REQUEST["id"], $elProps);
}
$('#recomendationsSlider').slick({
autoplay: false,
slidesToShow: 4,
arrows: true,
dots:false,
lazyLoad: 'ondemand',
responsive: [
{
breakpoint: 1200,
settings: {
slidesToShow: 3,
slidesToScroll: 3,
infinite: true,
}
},
{
breakpoint: 992,
settings: {
slidesToShow: 2,
slidesToScroll: 2
}
},
{
breakpoint: 580,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
// You can unslick at a given breakpoint now by adding:
// settings: "unslick"
// instead of a settings object
],
nextArrow: $('.arrow-right'),
prevArrow: $('.arrow-left'),
});