Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getHasAvailableVariantQuery example
$this
->config =
$config
;
$this
->connection =
$connection
;
}
/** * @return QueryBuilder */
public
function
getQuery
(
array
$numbers
, ShopContextInterface
$context
)
{
$esdQuery
=
$this
->
getEsdQuery
(
)
;
$customerGroupQuery
=
$this
->
getCustomerGroupQuery
(
)
;
$availableVariantQuery
=
$this
->
getHasAvailableVariantQuery
(
)
;
$fallbackPriceQuery
=
$this
->
getPriceCountQuery
(
':fallback'
)
;
$query
=
$this
->connection->
createQueryBuilder
(
)
;
$query
->
select
(
$this
->fieldHelper->
getArticleFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getTopSellerFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getVariantFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getUnitFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getTaxFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getPriceGroupFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getManufacturerFields
(
)
)
->
addSelect
(
$this
->fieldHelper->
getEsdFields
(
)
)
->
addSelect
(
'(' .
$esdQuery
->
getSQL
(
)
. ') as __product_has_esd'
)