Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
hydrateBasket example
'type' =>
$context
->
getPriceType
(
)
,
]
,
]
,
]
,
]
;
$response
=
$this
->storeClient->
doAuthPostRequest
(
$token
,
'/basket',
$data
)
;
$basket
=
$this
->hydrator->
hydrateBasket
(
$response
)
;
$basket
->
setLicenceDomain
(
$context
->
getLicenceShop
(
)
)
;
foreach
(
$basket
->
getDomains
(
)
as
$domain
)
{
if
(
$domain
->
getDomain
(
)
!==
$context
->
getLicenceShop
(
)
)
{
continue
;
}
$basket
->
setLicenceShopId
(
$domain
->
getId
(
)
)
;
}