View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002762 | OXID eShop (all versions) | 3.1. Design, GUI, UX | public | 2011-04-19 14:29 | 2011-05-12 14:34 |
Reporter | tjungcl | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Product Version | 4.5.0 revision 34568 | ||||
Summary | 0002762: empty brands in slider and by-brand not affected by "hide empty categories" option | ||||
Description | In the demo data there are a few brands without any products assigned to them. Those brands (Mauirippers,Big-Matsol) are shown in the brand-slider as well as in the brand-overview /by-brand/. From frontends point of view the brands are very like categories, so of course you could just deactivate them, but it would be appropriate if they where hidden when the option blDontShowEmptyCategories is true. BTW: the option perfShowActionCatArticleCnt affects brands. | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
Yes, for me that's a known problem and therefore I integrated this functionality into a free extension some time ago, see this: http://www.oxid-esales.com/de/exchange/extensions/show-manu (only manu_oxmanufacturerlist.php for this topic) But it is also my opinion that it would be much better to get this as a standard oxid feature because it makes sense somehow. You only have to add 5 lines of code to get this working and this is what I came up with (works with oxid 4.3/4.4/4.5): public function loadManufacturerList() { $sLangAdd = ''; if (oxView::getShopVersion() < '4.5.0') $sLangAdd = oxLang::getInstance()->getLanguageTag(); $oBaseObject = $this->getBaseObject(); $sFieldList = $oBaseObject->getSelectFields(); $sViewName = $oBaseObject->getViewName(); $this->getBaseObject()->setShowArticleCnt( $this->_blShowManufacturerArticleCnt ); $sWhere = ''; if ( !$this->isAdmin() ) { $sWhere = $oBaseObject->getSqlActiveSnippet(); $sWhere = $sWhere?" where $sWhere and ":' where '; $sWhere .= "{$sViewName}.oxtitle{$sLangAdd} != '' "; if ($this->getConfig()->getConfigParam('blDontShowEmptyCategories')) { $sArtTable = getViewName('oxarticles'); $sWhere .= "AND {$sViewName}.oxid IN (SELECT oxmanufacturerid FROM {$sArtTable} "; $sWhere .= "WHERE {$sArtTable}.oxshopid=".oxDb::getDb()->quote($this->getConfig()->getShopId())." AND oxactive=1)"; } } $sSelect = "select {$sFieldList} from {$sViewName} {$sWhere} order by {$sViewName}.oxtitle{$sLangAdd}"; $this->selectString( $sSelect ); } |
|
According to the BTW-note: I am not sure, but it could have something to do with this(?): https://bugs.oxid-esales.com/view.php?id=2871 |
|
Reminder sent to: tjungcl Hi, To solve that case, best would be to add separate option for "Hide empty Brands". But we cannot include this into standard eShop because it would slowdown the performance: it would need to check the amount of products for each Brand each time. So this case can be solved by including such feature as a module for eShop. And I think there is one already created, please check in OXID Exchange. I will post the link here later, if will find one. Anyway - that's a good idea and would be nice to have for some smaller shops for sure. Best regards, |