Answer the question
In order to leave comments, you need to log in
For some reason, in the cart in Bitrix it does not go to the checkout page, what's the problem?
For some reason, in the cart in Bitrix, it does not go to the checkout page. It just redirects to the main page. Where to dig, tell pzh?
Is this a JS issue? It’s just that they commented somewhere before me so that the basket does not function, but I don’t understand where to look.
Here is the code:
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();
$arUrls = Array(
"delete" => $APPLICATION->GetCurPage()."?".$arParams["ACTION_VARIABLE"]."=delete&id=#ID#",
"delay" => $APPLICATION->GetCurPage()."?".$arParams["ACTION_VARIABLE"]."=delay&id=#ID#",
"add" => $APPLICATION->GetCurPage()."?".$arParams["ACTION_VARIABLE"]."=add&id=#ID#",
);
$arBasketJSParams = array(
'SALE_DELETE' => GetMessage("SALE_DELETE"),
'SALE_DELAY' => GetMessage("SALE_DELAY"),
'SALE_TYPE' => GetMessage("SALE_TYPE"),
'TEMPLATE_FOLDER' => $templateFolder,
'DELETE_URL' => $arUrls["delete"],
'DELAY_URL' => $arUrls["delay"],
'ADD_URL' => $arUrls["add"]
);
?>
<script type="text/javascript">
var basketJSParams = <?=CUtil::PhpToJSObject($arBasketJSParams);?>
</script>
<?
$APPLICATION->AddHeadScript($templateFolder."/script.js");
if (strlen($arResult["ERROR_MESSAGE"]) <= 0)
{
?>
<div id="warning_message">
<?
if (is_array($arResult["WARNING_MESSAGE"]) && !empty($arResult["WARNING_MESSAGE"]))
{
foreach ($arResult["WARNING_MESSAGE"] as $v)
echo ShowError($v);
}
?>
</div>
<?
$normalCount = count($arResult["ITEMS"]["AnDelCanBuy"]);
$normalHidden = ($normalCount == 0) ? "style=\"display:none\"" : "";
$delayCount = count($arResult["ITEMS"]["DelDelCanBuy"]);
$delayHidden = ($delayCount == 0) ? "style=\"display:none\"" : "";
$subscribeCount = count($arResult["ITEMS"]["ProdSubscribe"]);
$subscribeHidden = ($subscribeCount == 0) ? "style=\"display:none\"" : "";
$naCount = count($arResult["ITEMS"]["nAnCanBuy"]);
$naHidden = ($naCount == 0) ? "style=\"display:none\"" : "";
?>
<form method="post" action="<?=POST_FORM_ACTION_URI?>" name="basket_form" id="basket_form">
<div id="basket_form_container">
<div class="bx_ordercart">
<div class="bx_sort_container">
<span><?=GetMessage("SALE_ITEMS")?></span>
<a href="javascript:void(0)" id="basket_toolbar_button" class="current" onclick="showBasketItemsList()"><?=GetMessage("SALE_BASKET_ITEMS")?><div id="normal_count" class="flat" style="display:none"> (<?=$normalCount?>)</div></a>
<a href="javascript:void(0)" id="basket_toolbar_button_delayed" onclick="showBasketItemsList(2)" <?=$delayHidden?>><?=GetMessage("SALE_BASKET_ITEMS_DELAYED")?><div id="delay_count" class="flat"> (<?=$delayCount?>)</div></a>
<a href="javascript:void(0)" id="basket_toolbar_button_subscribed" onclick="showBasketItemsList(3)" <?=$subscribeHidden?>><?=GetMessage("SALE_BASKET_ITEMS_SUBSCRIBED")?><div id="subscribe_count" class="flat"> (<?=$subscribeCount?>)</div></a>
<a href="javascript:void(0)" id="basket_toolbar_button_not_available" onclick="showBasketItemsList(4)" <?=$naHidden?>><?=GetMessage("SALE_BASKET_ITEMS_NOT_AVAILABLE")?><div id="not_available_count" class="flat"> (<?=$naCount?>)</div></a>
</div>
<?
include($_SERVER["DOCUMENT_ROOT"].$templateFolder."/basket_items.php");
include($_SERVER["DOCUMENT_ROOT"].$templateFolder."/basket_items_delayed.php");
include($_SERVER["DOCUMENT_ROOT"].$templateFolder."/basket_items_subscribed.php");
include($_SERVER["DOCUMENT_ROOT"].$templateFolder."/basket_items_not_available.php");
?>
</div>
</div>
<input type="hidden" name="BasketOrder" value="BasketOrder" />
<input type="hidden" name="ajax_post" id="ajax_post" value="Y">
</form>
<?
}
else
{
ShowError($arResult["ERROR_MESSAGE"]);
}
?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question