Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getVoteAverage example
$promotion
[
'pricegroupID'
]
=
$product
->
getPriceGroup
(
)
->
getId
(
)
;
}
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'
]
;
$product
->
setPriceRules
(
$listProduct
->
getPriceRules
(
)
)
;
$product
->
setCheapestPriceRule
(
$listProduct
->
getCheapestPriceRule
(
)
)
;
$product
->
setManufacturerNumber
(
$listProduct
->
getManufacturerNumber
(
)
)
;
$product
->
setMetaTitle
(
$listProduct
->
getMetaTitle
(
)
)
;
$product
->
setTemplate
(
$listProduct
->
getTemplate
(
)
)
;
$product
->
setHasConfigurator
(
$listProduct
->
hasConfigurator
(
)
)
;
$product
->
setSales
(
$listProduct
->
getSales
(
)
)
;
$product
->
setHasEsd
(
$listProduct
->
hasEsd
(
)
)
;
$product
->
setEsd
(
$listProduct
->
getEsd
(
)
)
;
$product
->
setIsPriceGroupActive
(
$listProduct
->
isPriceGroupActive
(
)
)
;
$product
->
setBlockedCustomerGroupIds
(
$listProduct
->
getBlockedCustomerGroupIds
(
)
)
;
$product
->
setVoteAverage
(
$listProduct
->
getVoteAverage
(
)
)
;
$product
->
setHasAvailableVariant
(
$listProduct
->
hasAvailableVariant
(
)
)
;
$product
->
setCheapestUnitPrice
(
$listProduct
->
getCheapestUnitPrice
(
)
)
;
$product
->
setFallbackPriceCount
(
$listProduct
->
getFallbackPriceCount
(
)
)
;
$product
->
setCustomerPriceCount
(
$listProduct
->
getCustomerPriceCount
(
)
)
;
foreach
(
$listProduct
->
getAttributes
(
)
as
$name
=>
$attribute
)
{
$product
->
addAttribute
(
$name
,
$attribute
)
;
}
foreach
(
$listProduct
->
getStates
(
)
as
$state
)
{
$product
->
addState
(
$state
)
;
}