Answer the question
In order to leave comments, you need to log in
The add to cart button does not work on 1s Bitrix?
In general, the task is as follows... in the bitrix.catalog complex component, display products by brand.
in urlrewrite.php I write the following
array(
"CONDITION" => "#^/beta/katalog/brand_(.*)/.*#",
"RULE" => "BRAND_NAME=\$1",
"ID" => "bitrix:catalog",
"PATH" => "/beta/katalog/index.php",
),
if(isset($_REQUEST['BRAND_NAME']) && !empty($_REQUEST['BRAND_NAME'])){
global $arrFilter;
$arrFilter = array("PROPERTY_MANUFACTURER_VALUE"=>$_REQUEST['BRAND_NAME']);
$APPLICATION->AddChainItem($_REQUEST['BRAND_NAME'], "".SITE_DIR."katalog/");
$APPLICATION->SetTitle($_REQUEST['BRAND_NAME'], "".SITE_DIR."katalog/");
unset($_REQUEST['BRAND_NAME']);
}
GET http://******/beta/katalog/brand_****/?BRAND_NAME=*****&action=ADD2BASKET&id=14187&ajax_basket=Y&quantity=1&prop[0]=0 404 (Not Found)
a.ajax @ core_ajax.js:1534
a.ajax.loadJSON @ core_ajax.js:1534
window.JCCatalogSection.SendToBasket @ page_c4b059f83db2c3de36a38c1ca5fc6e81.js143686117163184:2374
window.JCCatalogSection.Basket @ page_c4b059f83db2c3de36a38c1ca5fc6e81.js143686117163184:2419
window.JCCatalogSection.Add2Basket @ page_c4b059f83db2c3de36a38c1ca5fc6e81.js?143686117163184:2357
BX.delegate @ core.js:3875
Answer the question
In order to leave comments, you need to log in
Judging by the 404 in the console, the rule in urlrewrite is crooked.
make your own complex component based on bitrix:catalog by adding the necessary url for the brand page there.
'BRAND_PAGE_URL' => #FOLDER#/BRAND_#BRAND_CODE#/
Where the bitrix:section component will be executed with the filter by brand, through, as already mentioned arrFilter, the global array.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question