Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
convertVoteAverageStruct example
if
(
$product
->
displayFromPrice
(
)
)
{
$promotion
[
'priceStartingFrom'
]
=
$promotion
[
'price'
]
;
}
if
(
$product
->
getCover
(
)
)
{
$promotion
[
'image'
]
=
$this
->
convertMediaStruct
(
$product
->
getCover
(
)
)
;
}
if
(
$product
->
getVoteAverage
(
)
)
{
$promotion
[
'sVoteAverage'
]
=
$this
->
convertVoteAverageStruct
(
$product
->
getVoteAverage
(
)
)
;
}
$promotion
[
'prices'
]
=
[
]
;
foreach
(
$product
->
getPrices
(
)
as
$price
)
{
$promotion
[
'prices'
]
[
]
=
$this
->
convertProductPriceStruct
(
$price
)
;
}
$promotion
[
'linkBasket'
]
=
$this
->config->
get
(
'baseFile'
)
.
'?sViewport=basket&sAdd=' .
$promotion
[
'ordernumber'
]
;
$promotion
[
'linkDetails'
]
=
$this
->config->
get
(
'baseFile'
)
.