@font-face {
font-family: "PT Serif";
src: url("../fonts/ptserif-normal.eot");
src: local('☺'),
url("../fonts/ptserif-normal.eot?#iefix") format("embedded-opentype"),
url("../fonts/ptserif-normal.woff") format("woff"),
url("../fonts/ptserif-normal.ttf") format("truetype"),
url("../fonts/ptserif-normal.svg#PT Serif") format("svg");
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: "PT Serif";
src: url("../fonts/ptserif-bold.eot");
src: local('☺'),
url("../fonts/ptserif-bold.eot?#iefix") format("embedded-opentype"),
url("../fonts/ptserif-bold.woff") format("woff"),
url("../fonts/ptserif-bold.ttf") format("truetype"),
url("../fonts/ptserif-bold.svg#PT Serif") format("svg");
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: "PT Serif";
src: url("../fonts/ptserif-italic.eot");
src: local('☺'),
url("../fonts/ptserif-italic.eot?#iefix") format("embedded-opentype"),
url("../fonts/ptserif-italic.woff") format("woff"),
url("../fonts/ptserif-italic.ttf") format("truetype"),
url("../fonts/ptserif-italic.svg#PT Serif") format("svg");
font-weight: normal;
font-style: italic;
}
@font-face {
font-family: "PT Serif";
src: url("../fonts/ptserif-bolditalic.eot");
src: local('☺'),
url("../fonts/ptserif-bolditalic.eot?#iefix") format("embedded-opentype"),
url("../fonts/ptserif-bolditalic.woff") format("woff"),
url("../fonts/ptserif-bolditalic.ttf") format("truetype"),
url("../fonts/ptserif-bolditalic.svg#PT Serif") format("svg");
font-weight: bold;
font-style: italic;
}
@font-face {
font-family: 'Web font';
src: url('webfont.woff2') format('woff2'),
url('webfont.ttf') format('truetype'), /* Только если нужна поддержка старых Android, иначе закомментировать */
url('webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
services:
_defaults:
autowire: true
autoconfigure: true
bind:
App\Repository\Repository $cachedRepository: '@App\Repository\User\CachedUserRepository'
App\Repository\Repository: '@App\Repository\User\DoctrineUserRepository'
App\Entity\UniqueEntityInterface: '@App\Entity\User'
user_exists_checker:
class: App\ExistsChecker
bind:
App\Repository\Repository: '@App\Repository\User\ApiUserRepository'
user_exists_checker:
class: App\ExistsChecker
bind:
App\Repository\Repository: '@App\Repository\User\ApiUserRepository'
_defaults:
autowire: true
autoconfigure: true
bind:
App\Repository\Repository $cachedRepository: '@App\Repository\User\CachedUserRepository'
App\Repository\Repository $repository
будете использовать App\Repository\Repository $cachedRepository
, то вам придет App\Repository\User\CachedUserRepository
$obItem = $obBasket->getExistsItem('catalog', $productId, [
0 => ['CODE' => 'PROP1', 'VALUE' => 'electron'],
//......
]);
$obItem = $obBasket->getExistsItem('catalog', $productId, [
0 => ['CODE' => 'ARTNUMBER', 'VALUE' => '235-81-03'],
1 => ['CODE' => 'COLOR_REF', 'VALUE' => 'Черный'],
2 => ['CODE' => 'SIZES_CLOTHES', 'VALUE' => 'XS'],
3 => ['CODE' => 'CATALOG.XML_ID', 'VALUE' => 'clothes_offers_s1'],
4 => ['CODE' => 'PRODUCT.XML_ID', 'VALUE' => '332#337'],
]);
\Bitrix\Main\Loader::includeModule('sale');
$siteId = 's1';
$fUserId = \Bitrix\Sale\FUser::getId();
$productId = 139;
$productByBasketItem = null;
$bProductInBasket = false;
$basket = \Bitrix\Sale\Basket::loadItemsForFUser($fUserId, $siteId);
$basketItems = $basket->getBasketItems();
if($basketItems) {
foreach($basketItems as $basketItem) {
if($basketItem->getField('PRODUCT_ID') == $productId) {
$productByBasketItem = $basketItem;
$bProductInBasket = true;
break;
}
}
}
var_dump($bProductInBasket);
var_dump($productByBasketItem);