$product->getVariants()

Hi,

Auf Kategorieebene (widget/product/listitem_line.tpl) gibt es eine Funktion $product->getVariants()

Diese hätte ich gerne auch auf der Produktdetailseite (page/details/inc/productmain.tpl) verfügbar.

Der Maintenace Mode kommt, sobald [{if $product->getVariants() }] abgefragt wird und in der Log Datei kommt eine ellanlange Zeile, die so beginnt: OXID Logger.ERROR: Call to a member function getVariants() on null ["[object] (Error(code: 0): Call to a member function getVariants() on null at /var/www/vhosts/devshop/source/tmp/smarty/ca1a0dcfe777fe503cf8d373399507e5^%%5E^5E9^5E9B9D5B%%productmain.tpl.php:60)

Was muss ich denn tun, um die Funktion auch in der producmain.tpl nutzen zu können?

Danke schon mal,
Florian

Die Fehlermeldung sagt, dass es dort kein $product gibt. Die Variable für den Artikel heißt anders, vermutlich $oDetailsArticle oder $oDetailsProduct. Finde die richtige Variable und probiere es nochmal

Jup, danke. $oDetailsProduct war es.
kann ich dort auch mit einer Funktion die aktuelle Produkt-URL herausfinden?

$oDetailsProduct->getLink()

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.