Сайт обращается к такому файлу, при попытке отправить запрос.
http://sitename.ru/bitrix/cache/js/s1/styleshop/template_d9b9ecc0102b73142a34be0517635e4a/template_d9b9ecc0102b73142a34be0517635e4a_v1.js?1587467022345551
Request Method: GET
Status Code: 200 OK
***
{"STATUS":"OK","MESSAGE":"\u0422\u043e\u0432\u0430\u0440 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443"}
***
параметры
?action=ADD2BASKET&id=10785&ajax_basket=Y&quantity=0.1
... .fail(function(t){console.log("Cannot add to cart")}
Request Method: GET
Status Code: 200 OK
***
{"STATUS":"OK","MESSAGE":"\u0422\u043e\u0432\u0430\u0440 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d \u0432 \u043a\u043e\u0440\u0437\u0438\u043d\u0443"}
***
параметры
?action=ADD2BASKET&id=10785&ajax_basket=Y&quantity=0.1
... .fail(function(t){console.log("Cannot add to cart")}
echo get_class($theme->Template()); // => Unisoftmedia\Styleshop\Template
// folderTemplate для следующего кода нашел с помощью
// echo '<pre>'.print_r( $theme->Template() , true ).'</pre>';
// [folderTemplate:Unisoftmedia\Styleshop\Template:private] => /home/c/ca69245/public_html/templates/template1/
public function requireTemplate()
{
if (file_exists($this->folderTemplate . 'index.php') && file_exists($this->folderTemplate . 'include_areas/')) {
global $APPLICATION;
require_once($this->folderTemplate . 'index.php');
}
}
<?
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/header.php");
$APPLICATION->SetPageProperty("NOT_SHOW_NAV_CHAIN", "Y");
echo 'start';
$theme->Template()->requireTemplate();
echo 'finish';
require($_SERVER["DOCUMENT_ROOT"]."/bitrix/footer.php");
<!DOCTYPE html>
<html lang="<?=LANGUAGE_ID?>">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="shortcut icon" type="image/x-icon" href="<?=SITE_DIR?>favicon.ico" />
<?
$site_name = \Bitrix\Main\Config\Option::get('main', 'site_name');
?>
<title><?php echo ($curPage == SITE_DIR.'index.php')?$site_name:$APPLICATION->ShowTitle()?></title><?
Asset::getInstance()->addString('<meta name="SKYPE_TOOLBAR" content="SKYPE_TOOLBAR_PARSER_COMPATIBLE" />');
/********* Head *************/
$theme->Head();
/********* end Head *************/
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/css/jquery.fancybox.min.css");
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/css/jquery.jscrollpane.min.css");
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/css/owl.carousel.min.css");
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/css/common.css");
if($page == 'personal')
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/css/personal.css");
if($theme->Option()->get('themes', '', SITE_ID))
Asset::getInstance()->addCss(SITE_TEMPLATE_PATH."/theme/".$theme->Option()->get('themes', '', SITE_ID)."/style.css");
/* jQuery */
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/components/bitrix/iblock.vote/stars/script.js");
/* jQuery Plugins */
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/subscribe.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.mousewheel.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.mmenu.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/bootstrap.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.fancybox.pack.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/zoom/jquery.elevateZoom-3.0.8.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.jscrollpane.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/scriptOffers.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/inputQuantity.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/owl.carousel.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.fancybox.pack.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/social-likes.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/jquery.maskedinput.min.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/plagins.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/basket.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/common.js");
Asset::getInstance()->addJs(SITE_TEMPLATE_PATH."/js/validate/validate.js");
$APPLICATION->ShowHead();
?>
</head>
<body class="<?=$page?>" itemscope itemtype="http://schema.org/WebPage"><!-- body -->
<div id="panel"><?php $APPLICATION->ShowPanel(); ?></div>
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
".default",
array(
"AREA_FILE_SHOW" => "file",
"PATH" => SITE_DIR."include/header/mobile/type1.php",
"AREA_FILE_RECURSIVE" => "N",
"EDIT_MODE" => "html"
),
false,
array(
"HIDE_ICONS" => "Y"
)
);?>
<div id="wrapper"><!-- wrapper -->
<!-- mmenu -->
<nav id="mmenu" class="mmenu-container">
<ul class="nav mmenu">
<li class="mm-search">
<span>
<button class="mobile-search-button mobile-search-btn" type="button"><?php echo Loc::getMessage('SEARCH') ?></button>
</span>
</li>
<?
$APPLICATION->ShowViewContent("mmenu");
?>
</ul>
</nav>
<!-- mmenu -->
<?/***************** header *******************/?>
<?$typeHeader = $theme->Option()->get('type_header', '', SITE_ID);
$typeHeader = $typeHeader? $typeHeader : 1 ;
?>
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
".default",
array(
"AREA_FILE_SHOW" => "file",
"PATH" => SITE_DIR."include/header/type{$typeHeader}.php",
"AREA_FILE_RECURSIVE" => "N",
"EDIT_MODE" => "html"
),
false,
array(
"HIDE_ICONS" => "Y"
)
);?>
<?/***************** header end *******************/?>
<main id="content" itemprop="mainContentOfPage">
<?if($curPage != SITE_DIR.'index.php')
{
?>
<div class="frame_breadcrumb">
<div class="container">
<div class="row">
<?php $APPLICATION->IncludeComponent(
"bitrix:breadcrumb",
"perfectum",
Array(
"START_FROM" => "0",
"PATH" => "",
"SITE_ID" => "-"
),
false,
Array('HIDE_ICONS' => 'Y')
); ?>
</div>
</div>
</div>
<?}?>
<?if($curPage != SITE_DIR.'index.php'):?>
<!--container--><div class="container">
<!--row--><div class="row">
<? global $needSidebar;
$needSidebar = preg_match("~^".SITE_DIR."(catalog|brands|auth|personal\/cart|personal\/order\/make)/~", $curPage);?>
<?if(!preg_match("~^".SITE_DIR."(catalog|brands)/~", $curPage)):?>
<div class="pagetitle <?=($needSidebar ? "col-xs-12" : "col-md-9")?>">
<h1><?php echo $APPLICATION->ShowTitle(false) ?></h1>
</div>
<?endif?>
<?if (!$needSidebar):?>
<?
$sec = preg_match("~^".SITE_DIR."(personal)/~", $curPage)? 'personal' : 'sect';
?>
<div class="sidebar col-md-3">
<?$APPLICATION->IncludeComponent(
"bitrix:main.include",
".default",
array(
"AREA_FILE_SHOW" => "file",
"AREA_FILE_SUFFIX" => "sidebar",
"AREA_FILE_RECURSIVE" => "Y",
"EDIT_MODE" => "html",
"PATH" => SITE_DIR.$sec."_sidebar.php",
"EDIT_TEMPLATE" => ""
),
false,
array(
"HIDE_ICONS" => "N"
)
);?>
</div><!--// sidebar -->
<?endif?>
<div class="<?=($needSidebar ? "col-xs-12" : "col-md-9")?>">
<div class='some_button class1 class2'></div>
<div class='some_button class4 class3'></div>
//Ну например active добавляет цвет кнопке
$('.some_button ').click(function(){
$('.some_button ').removeClass('active');
$(this).addClass('active'); })
// Мне нужно что по типу
$('.some_button ').click(function(event){
event.target.classClickedSTRIIIIIIIIINGGG!!.removeClass('active');
$(this).addClass('active'); })