I need to bring manufacturer list in alphabetical order and with the alphabet displayed on the top
A
addidas
anic
acende
B
Basince
bakionr
C
catnei
certtv
I need to bring manufacturer list in alphabetical order and with the alphabet displayed on the top
A
addidas
anic
acende
B
Basince
bakionr
C
catnei
certtv
Found the result: The below code will give you the necessary code.
In views ->oxview.php
public function getManufacturerlistformatted()
{
$oArtList = oxNew( 'oxarticlelist' );
$oArtList->loadManufacturerList();
$this->_aManufacturerList = $oArtList;
return appendLink($this->_aManufacturerList);
}
in core/oxarticlelist.php
public function loadManufacturerList()
{
$myConfig = $this->getConfig();
$sArticleTable = getViewName('oxmanufacturers');
$sSelect = "SELECT UCASE(SUBSTRING( t1.OXTITLE, 1, 1 )) AS initial,t1.OXID, t1.OXTITLE, COUNT( * ) AS count, (SELECT COUNT( * ) AS cnt
FROM {$sArticleTable } AS t2
WHERE SUBSTRING( t2.OXTITLE, 1, 1 ) = SUBSTRING( t1.OXTITLE, 1, 1 )
) AS letter_count
FROM oxmanufacturers AS t1
GROUP BY t1.OXTITLE";
$this->selectString($sSelect);
}
the below code works well ,
may i know how can i get the SEO URLS for the list
[QUOTE=workingprojectss;37945]Found the result: The below code will give you the necessary code.
In views ->oxview.php
public function getManufacturerlistformatted()
{
$oArtList = oxNew( 'oxarticlelist' );
$oArtList->loadManufacturerList();
$this->_aManufacturerList = $oArtList;
return appendLink($this->_aManufacturerList);
}
in core/oxarticlelist.php
public function loadManufacturerList()
{
$myConfig = $this->getConfig();
$sArticleTable = getViewName('oxmanufacturers');
$sSelect = "SELECT UCASE(SUBSTRING( t1.OXTITLE, 1, 1 )) AS initial,t1.OXID, t1.OXTITLE, COUNT( * ) AS count, (SELECT COUNT( * ) AS cnt
FROM {$sArticleTable } AS t2
WHERE SUBSTRING( t2.OXTITLE, 1, 1 ) = SUBSTRING( t1.OXTITLE, 1, 1 )
) AS letter_count
FROM oxmanufacturers AS t1
GROUP BY t1.OXTITLE";
$this->selectString($sSelect);
}
[/QUOTE]