Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
MinimalQuickViewPageLoadedEvent example
->
addAssociation
(
'mainCategories.category'
)
;
$criteria
->
getAssociation
(
'media'
)
->
addSorting
(
new
FieldSorting
(
'position'
)
)
;
$result
=
$this
->productRoute->
load
(
$productId
,
new
Request
(
)
,
$salesChannelContext
,
$criteria
)
;
$product
=
$result
->
getProduct
(
)
;
$page
=
new
MinimalQuickViewPage
(
$product
)
;
$event
=
new
MinimalQuickViewPageLoadedEvent
(
$page
,
$salesChannelContext
,
$request
)
;
$this
->eventDispatcher->
dispatch
(
$event
)
;
return
$page
;
}
}