Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
sGetArticlesByCategory example
$this
->view->
assign
(
'sortings',
$sortings
)
;
}
$criteria
=
$this
->storeFrontCriteriaFactory
->
createListingCriteria
(
$this
->
Request
(
)
,
$context
)
;
if
(
$condition
=
$criteria
->
getCondition
(
'manufacturer'
)
)
{
$criteria
->
removeCondition
(
'manufacturer'
)
;
$criteria
->
addBaseCondition
(
$condition
)
;
}
$categoryProducts
=
Shopware
(
)
->
Modules
(
)
->
Articles
(
)
->
sGetArticlesByCategory
(
$context
->
getShop
(
)
->
getCategory
(
)
->
getId
(
)
,
$criteria
)
;
if
(
!\
is_array
(
$categoryProducts
)
)
{
$categoryProducts
=
[
'facets' =>
[
]
]
;
}
$manufacturer
=
$this
->manufacturerService->
get
(
$manufacturerId
,
$context
)
;