View Issue Details

IDProjectCategoryView StatusLast Update
0006569Flow themeThemepublic2024-04-03 09:02
Reportervanilla thunder Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.0.0 
Fixed in Version2.3.2 
Summary0006569: "Specifications" heading for attributes is displayed even if there are no attributes
Descriptionproduct template for list view contains attributes, but the if-condition for displaying "specifications" heading only if product has attributes is wrong, this heading is always visible even if there are no attributes.
Steps To Reproducehttp://demoshop.oxid-esales.com/professional-edition/Wakeboarding/Sets/?ldtype=line
Additional Informationthe code from listitem_line.tpl:
[{assign var="oAttributes" value=$product->getAttributes()}]
[{if $oAttributes}]
 ...
[{/if}]

but getAttributes() always returns oxAttributeList object, which is evaluated as true by this if-condition.

In my Opinion, this condition should be changed to
[{if $oAttributes->count()}]
or
[{if $oAttributes|@count}]
TagsSolution Provided