+ Reply to Thread
Results 1 to 4 of 4

Thread: Change width of control panel columns

  1. #1
    Client coastalrugs's Avatar
    Join Date
    Dec 2007
    Posts
    171
    Squirrelcart version
    v3.2.0

    Change width of control panel columns

    I am editing some option choices. In the table listing the option choices, many are truncated (just visually to fit the column). Is there a way to alter the column widths of these tables?

    I would like to make the 'Choice' column wider to show more of the choice text.

    Thanks.

  2. #2
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    We don't have a feature to change the number of characters shown in a column before they are truncated.

  3. #3
    Client coastalrugs's Avatar
    Join Date
    Dec 2007
    Posts
    171
    Squirrelcart version
    v3.2.0
    I know this is slightly old, but I propose the following 'solution' until something more robust replaces it:

    In the control panel, looking at the data-grid of products, options, option values, etc... the Names can sometimes run a bit long and their titles are truncated to fit in the column. This can be a bit frustrating as some options and such may have very similar names, like 'My special product - black' and 'My special product - blue'. Both these items may be truncated to 'My special product - b...', making it very difficult to tell them apart in the control panel.

    Workaround/Solution:
    Add a 'title' attribute to the table cell containing these items so at the very least a brief hover over the cell will reveal the item's full name.

    This can be done in the file:
    squirrelcart/includes/show_records/data_grid.inc.php (line 700ish)
    Original:
    PHP Code:
    print "<td style=\"$border_left; ".$cell_styles[$r][$fname]."\" class=\"record_td\">$data_row[$fname]</td>"
    Altered:
    PHP Code:
    if($fname == 'Name' || $fname == 'Choice'){
        
    //Modified line to include title attribute
        
    print "<td style=\"$border_left; ".$cell_styles[$r][$fname]."\" class=\"record_td\" title=\"".htmlentities($record[$fname], ENT_QUOTES)."\">$data_row[$fname]</td>";
    }else{
        
    //original line below, encapsulating conditional loop added
        
    print "<td style=\"$border_left; ".$cell_styles[$r][$fname]."\" class=\"record_td\">$data_row[$fname]</td>";

    This could be simplified to add the if() statement inline to the table cell creation, but I like to make clear notations in the alterations I make, so the above code is a bit verbose.

  4. #4
    Squirrelcart Staff Jamie's Avatar
    Join Date
    May 2002
    Posts
    6,719
    Squirrelcart version
    v3.3.7
    Thanks for the suggestion. We have plans to update much of the design in the control panel in the future and will address this when we do that. That most likely will be the main focus of v4 in the same way the storefront got most of the attention in v3.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts