V
V
Vladimir2016-11-22 12:22:58
1C-Bitrix
Vladimir, 2016-11-22 12:22:58

How to set up e-commerce in Bitrix?

Good afternoon!
Setting up e-commerce for Yandex. Everything works except the last step. Purchase. I put the script in the purchase confirmation template. But he doesn't read it.
Here is the code.
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();?>
<?
if ($arParams["SET_TITLE"] == "Y")
$APPLICATION->SetTitle(Bitrix\Main\Localization\Loc::getMessage("SOA_ORDER_COMPLETE"));
if (!empty($arResult["ORDER"]))
{ ?>


<?= GetMessage("SOA_ORDER_SUC", Array("#ORDER_DATE#" => $arResult["ORDER"]["DATE_INSERT"], "#ORDER_ID#" => $arResult["ORDER"]["ACCOUNT_NUMBER"] ))?>
<?= GetMessage("SOA_ORDER_SUC1", Array("#LINK#" => $arParams["PATH_TO_PERSONAL"])) ?>

<?
if (!empty($arResult["PAY_SYSTEM"]))
{
?>

<?=GetMessage("SOA_PAY")?>
<?=CFile::ShowImage($arResult["PAY_SYSTEM"]["LOGOTIP"], 100, 100, "border=0", "", false);?>
<?= $arResult["PAY_SYSTEM"]["NAME"] ?>

<?
$service = \Bitrix\Sale\PaySystem\Manager::getObjectById($arResult["ORDER"]['PAY_SYSTEM_ID']);
if ($arResult["PAY_SYSTEM"]["NEW_WINDOW"] == "Y" && $arResult["PAY_SYSTEM"]["IS_CASH"] != "Y")
{
?>
<?= GetMessage("SOA_PAY_LINK", Array("#LINK#" => $arParams["PATH_TO_PAYMENT"]."?ORDER_ID=".urlencode(urlencode($arResult["ORDER"]["ACCOUNT_NUMBER"]))."&PAYMENT_ID=".$arResult[ 'ORDER']["PAYMENT_ID"]))?>
<?
if (CSalePdf::isPdfAvailable() && $service->isAffordPdf())
{
?>
<?
}
}
else
{
if ($arResult["PS_ERROR"] === true)
echo ''.GetMessage("SOA_ORDER_PS_ERROR").'';
else
echo $arResult["PAY_SYSTEM"]["BUFFERED_OUTPUT"]; }
?>

<?
}
else if ($arResult["PS_ERROR"] === true)
{
echo ''.GetMessage("SOA_ORDER_PS_ERROR").'';
}
}
else
{
?>
<?=GetMessage("SOA_ERROR_ORDER")?>

<?=GetMessage("SOA_ERROR_ORDER_LOST", Array("#ORDER_ID#" => $arResult["ACCOUNT_NUMBER"]))?>
<?=GetMessage("SOA_ERROR_ORDER_LOST1")?>

<?
}
?>
And in fact this is what
12cc6dfba9904f8a97331d1a1a21e5c1.jpg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Maksimenko, 2016-11-22
@olegprof

Wrote a recipe on an e-commerce blog . Suitable for both Google and Yandex.

V
VladimirPortev, 2016-11-22
@VladimirPortev

I need no handler.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question