Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
considerTaxInput example
->
addOrderBy
(
'customerGroup.id', 'ASC'
)
->
addOrderBy
(
'prices.from', 'ASC'
)
->
setParameter
(
'variantId',
$id
)
;
$variant
=
$builder
->
getQuery
(
)
->
getOneOrNullResult
(
$this
->
getResultMode
(
)
)
;
if
(
!
$variant
)
{
throw
new
NotFoundException
(
sprintf
(
'Variant by id %d not found',
$id
)
)
;
}
if
(
\
is_array
(
$variant
)
&& !
empty
(
$options
[
'considerTaxInput'
]
)
)
{
$variant
=
$this
->
considerTaxInput
(
$variant
)
;
}
return
$variant
;
}
/** * @param int $offset * @param int $limit * * @return array */