Hi Björn, Thank you for your quick answer!!
I already tried, what you suggested. Sorry, I did not mention that in my original E-Mail. I created a module for oxCategory and set oxCategory::$_blUseLazyLoading to true in the overridden init() method. Unfortunately, this does not seem to have any effect on my problem. Best regards Dipl.-Ing. (FH) Michael Zender Development eCommerce Technical Project Lead MOS-TANGRAM AG Wohlerstrasse 2 CH-5623 Boswil Phone: +41 (0)56 677 82 20 Fax: +41 (0)56 677 82 99 E-Mail: [email protected]<mailto:[email protected]> Internet: http://www.mos-tangram.com<http://www.mos-tangarm.com/> Von: [email protected] [mailto:[email protected]] Im Auftrag von Lange, Björn Gesendet: Mittwoch, 23. Januar 2013 11:40 An: [email protected] Betreff: Re: [oxid-dev-general] Lazy Loading Hi Michael, 2013/1/23 Michael Zender <[email protected]<mailto:[email protected]>> I investigated this issue a little further and discovered, that the $oxcmp_categories object is constructed using the method oxCategoryList::buildTree() which does NOT load the oxpromoicon field for very category. BUT, as far as my understanding of lazy loading goes, the respective field should be loaded automatically, when it is accessed, but not already loaded. I would use a module till now for this use case. I hope someone can elaborate a little bit on this topic, how the lazy loading feature in OXID works and how one has to use it. Also, for a scenario like mine, what would be the best practice to get the URL I’m interested in. Lazy Loading works through the magical getter in the oxbase class. If the property $this->_blUseLazyLoading is true and the requested field is a table field of the objects core table, the value is loaded (either from the cache or the database). Take a look into oxarticle. _blUseLazyLoading is true by default. But in oxcategory, it is false by default. Try to change the value and i think (without further tests), it should work. Regards, Björn -- _________________________________ WBL Konzept GmbH Björn Simon Lange Geschäftsführender Gesellschafter Bilker Straße 34 40213 Düsseldorf Telefon: 0211 942 120 31 | Fax: 0211 942 120 32 www.wbl-konzept.de<http://www.wbl-konzept.de/> | www.facebook.com/wbl.konzept<http://www.facebook.com/wbl.konzept> | [email protected]<mailto:[email protected]>
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
