Hi all,
In the ecommerce module I have products that appear on many pages.
The problem is when I am in the CMS and want to tick which other pages the product belongs to it's so messy because the pages are not listed alphabetically. I have over two hundred pages so I have to trawl through them to find the ones I need.
I've been toying with the code below from the Product.php file but cannot get the pages to appear by name (I'm guessing they have ordered themselves by page ID maybe)
Does anyone have any advice on how I can have these pages appear alphabetically in the Product Groups tab?
protected function getProductGroupsTable() {
$tableField = new ManyManyComplexTableField(
$this,
'ProductGroups',
'ProductGroup',
array(
'Title' => 'Product Group Page Title'
)
);
$tableField->setPageSize(30);
$tableField->setPermissions(array());
//TODO: use a tree structure for selecting groups
//$field = new TreeMultiselectField('ProductGroups','Product Groups','ProductGroup');
return $tableField;
}