View Issue Details

IDProjectCategoryView StatusLast Update
0006536OXID eShop (all versions)1.01. Products (product, categories, manufacturer, promotions etc.)public2016-11-02 17:44
Reporteralfredbez Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionno change required 
Product Version4.10.1 / 5.3.1 
Summary0006536: getLongDesc() doesn't return LongDesc outside Category
DescriptionOxidEsales\Eshop\Application\Model\Category@getLongDesc does only work if you are currently on the category-page in the frontend. It is not possible to get a the LongDescription for a Category from e.g. the homepage.
Steps To Reproduce1. enter a longdesc for a category
2. replace '<a [{if' with '<a data-longdesc="[{$ocat->getLongDesc()}]" [{if' in https://github.com/OXID-eSales/oxideshop_ce/blob/507e4a3bb8cb043f3e2514a3be795dd3afa79609/source/Application/views/azure/tpl/widget/header/categorylist.tpl#L29
3. open homepage and see empty data-longdesc attribute
4. go to the category-page in frontend and see the entered description as expected
Additional InformationgetShortDescription() works as expected (= outside the category)
TagsNo tags attached.
ThemeAll
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

alfredbez

2016-11-02 12:34

reporter   ~0011855

I created also a gist with demo-code:

My Changes: https://gist.github.com/alfredbez/6e7e677643d048846648b998c562b2c8/revisions
Output: https://gist.github.com/alfredbez/6e7e677643d048846648b998c562b2c8#gistcomment-1911943

QA

2016-11-02 17:43

administrator   ~0011856

The long description of categories is generally not used in standard Oxid Shops. The LongDesc is not displayed in the homepage due to hard-coded columns being fetched from oxcategories table in the database (https://github.com/OXID-eSales/oxideshop_ce/blob/master/source/Application/Model/CategoryList.php#L150). When oxlongdesc is required in categorylists, the method _getSqlSelectFieldsForTree() can be extended to include "$sTable.oxlongdesc as oxlongdesc" in the variable $sFieldList.