hi for whom the above doesn't work or want to have an option in adding a view all in the dropdownbox namely "list length" at the administrator backend of joomla. The code is based on the above so many thanks to bigallstorm. A couple of words about the code:
The code adds in the front end in the dropdown box an all option and like bigallstorm's code, adds next to the dropdown box a link named view all.
Also it adds in the back end for virtuemart component in the dropdown box an all option. (very helpful in my opinion). For using joomfish,
i have added at /administrator/components/com_virtuemart/languages/common 'PHPSHOP_SHOW_PRODUCTS' => 'View all', and 'PHPSHOP_ALL_DROP_DOWN_BOX' => 'All'.
so go to administrator/components/com_virtuemart/classes/pageNavigation.class.php
and find
if (empty( $link)) {
$limits[50] = 50;
} else {
$limits[vmRoute($link.'&limit=50')] = 50;
}
// build the html select list
if (empty( $link)) {
$html = ps_html::selectList( 'limit', $this->limit, $limits, 1, '', 'onchange="this.form.submit();"' );
} else {
$current = vmRoute($link.'&limit='.$this->limit);
$html = ps_html::selectList( 'limit', $current, $limits, 1, '', 'onchange="location.href=this.value"' );
}
$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"$this->limitstart\" />";
return $html;
}
and replace it with
global $VM_LANG;
if (empty( $link)) {
$limits[50000] = $VM_LANG->_('PHPSHOP_ALL_Drop_Down_Box');
} else {
$limits[vmRoute($link.'&limit=50000')] = $VM_LANG->_('PHPSHOP_ALL_Drop_Down_Box');
}
// build the html select list
if (empty( $link)) {
$html = ps_html::selectList( 'limit',$this->limit, $limits, 1, '', 'onchange="this.form.submit();"' );
} else {
$current = vmRoute($link.'&limit='.$this->limit);
$html = ps_html::selectList( 'limit', $current, $limits, 1, '', 'onchange="location.href=this.value"' );
$href3 = $html;
$currents = vmRoute($link.'&limit=50000');
$class_att = 'class="button"';
global $VM_LANG;
$text = $VM_LANG->_('PHPSHOP_SHOW_PRODUCTS');
$href1 = vmCommonHTML::hyperlink($currents,$text, _self, $text,'onclick="javascript:GoToBack();"', '', 'limit', 'onclick="javascript:GoToBack();"', $limits );
$html = $href3.$href1;
}
$html .= "\n<input type=\"hidden\" name=\"limitstart\" value=\"$this->limitstart\" />";
return $html;
}
good luck i hope you find it useful.